Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

vim-doge

> 编程语言
Open source

(Do)cumentation (Ge)nerator for nearly 20 languages Generate proper code documentation with a single keypress. ⚡️

1.1K stars0 likes0 views
WebsiteGitHub

About

(Do)cumentation (Ge)nerator for nearly 20 languages Generate proper code documentation with a single keypress. ⚡️

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. -- Martin Fowler, 1999

We all love documentation because it makes our codebases easier to understand, yet no one has time to write it in a good and proper way.

Vim-doge is a (Do)cumentation (Ge)nerator which will generate a proper documentation skeleton based on certain expressions (mainly functions). Simply put your cursor on a function, press d, jump quickly through TODO items using and to quickly add descriptions and go on coding!

Table of Contents

  • Table of Contents
  • Supported languages and doc standards
  • Getting started
  • Configuration
    • Choosing a different doc standard
    • Options
      • g:doge_install_path
      • g:doge_enable_mappings
      • g:doge_mapping
      • g:doge_filetype_aliases
      • g:doge_buffer_mappings
      • g:doge_mapping_comment_jump_forward
      • g:doge_mapping_comment_jump_backward
      • g:doge_comment_interactive
      • g:doge_comment_jump_wrap
      • g:doge_comment_jump_modes
  • Commands
    • :DogeGenerate {doc_standard}
  • Language-specific configuration
    • JavaScript
    • PHP
    • Python
    • Doxygen
  • Headless mode
  • Help
  • Contributing
    • Tree sitter
  • Development
    • Environment setup
    • Helper
    • Testing locally
  • Motivation
  • Supporting vim-doge
  • Alternative projects
  • License

Supported languages and doc standards

Every language that has a documentation standard should be supported by vim-doge.

Is your favorite language not supported? [Suggest a new language][suggest-language] :tada:

Is your favorite doc standard not supported? [Suggest a new doc standard][suggest-doc-standard] :tada:

Language Doc standards
:white_check_mark: Python [reST][py-rest], [Numpy][py-numpy], [Google][py-google], [Sphinx][py-sphinx], [Doxygen][doxygen]
:white_check_mark: PHP [phpdoc][phpdoc]
:white_check_mark: JavaScript (Vanilla, ES6, FlowJS, NodeJS, Svelte, Vue) [JSDoc][jsdoc]
:white_check_mark: TypeScript [JSDoc][jsdoc]
:white_check_mark: HTML (through inline `` tags) [JSDoc][jsdoc]
:white_check_mark: Lua [LDoc][ldoc]
:white_check_mark: Java [JavaDoc][javadoc]
:white_check_mark: Groovy [JavaDoc][javadoc]
:white_check_mark: Ruby [YARD][yard]
:white_check_mark: C++ [Doxygen][doxygen]
:white_check_mark: C [Doxygen][doxygen], [KernelDoc][kerneldoc]
:white_check_mark: C# [XMLDoc][xmldoc]
:white_check_mark: Bash [Google][sh-google]
:white_check_mark: Rust [RustDoc][rustdoc]
:white_check_mark: R [Roxygen2][roxygen2]
:white_check_mark: Scala [ScalaDoc][scaladoc]

Getting started

Using plug:

  • Plug 'kkoomen/vim-doge', { 'do': { -> doge#install() } }

Using vim-pack:

  • git clone --recursive --depth 1 https://github.com/kkoomen/vim-doge ~/.vim/pack/*/start/vim-doge
  • Open Vim and run :call doge#install()

Using Pathogen:

  • git clone --recursive --depth 1 https://github.com/kkoomen/vim-doge ~/.vim/bundle/vim-doge
  • Open Vim and run :call doge#install()

Using Vundle:

  • Plugin 'kkoomen/vim-doge'
  • Open Vim and run :call doge#install()

Using packer.nvim:

lua
use {
  'kkoomen/vim-doge',
  run = ':call doge#install()'
}

Using LazyVim:

  • Add plugin config to lua plugins folder:
    {
      "kkoomen/vim-doge",
    }
  • Open nvim and run :call doge#install()

Configuration

Run :help doge to get the full help page.

Choosing a different doc standard

Vim-doge supports multiple doc standard and you can overwrite them per filetype in your vimrc. Is your favorite doc standard not supported? [Suggest a new doc standard][suggest-doc-standard] :tada:

Example:

vim
let g:doge_doc_standard_python = 'numpy'

If you want to change the doc standard specifically for a buffer, then you can do:

vim
" Inside test.py
:let b:doge_doc_standard = 'numpy'

If you want to generate a docblock using a different doc standard just for a specific expression, then you can use the DogeGenerate command:

vim
" Inside test.py, cursor is at a function expression (cursor = `|`):
"   |def foo(p1, p2):
"       pass
:DogeGenerate numpy

Here is the full list of available doc standards per filetype:

:warning: For C and C++, see C Family Doc Standard Examples.

Variable Default Supported
g:doge_doc_standard_python 'reST' 'reST', 'numpy', 'google', 'sphinx', 'doxygen'
g:doge_doc_standard_php 'phpdoc' 'phpdoc'
g:doge_doc_standard_javascript 'jsdoc' 'jsdoc'
g:doge_doc_standard_html 'jsdoc' 'jsdoc'
g:doge_doc_standard_lua 'ldoc' 'ldoc'
g:doge_doc_standard_java 'javadoc' 'javadoc'
g:doge_doc_standard_groovy 'javadoc' 'javadoc'
g:doge_doc_standard_ruby 'YARD' 'YARD'
g:doge_doc_standard_cpp 'doxygen_javadoc' 'doxygen_javadoc', 'doxygen_javadoc_no_asterisk', 'doxygen_javadoc_banner', 'doxygen_qt', 'doxygen_qt_no_asterisk', 'doxygen_cpp_comment_slash', 'doxygen_cpp_comment_exclamation', 'doxygen_cpp_comment_slash_banner'
g:doge_doc_standard_c 'doxygen_javadoc' 'kernel_doc', 'doxygen_javadoc', 'doxygen_javadoc_no_asterisk', 'doxygen_javadoc_banner', 'doxygen_qt', 'doxygen_qt_no_asterisk', 'doxygen_cpp_comment_slash', 'doxygen_cpp_comment_exclamation', 'doxygen_cpp_comment_slash_banner'
g:doge_doc_standard_sh 'google' 'google'
g:doge_doc_standard_rs 'rustdoc' 'rustdoc'
g:doge_doc_standard_cs 'xmldoc' 'xmldoc'

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustboilerplatedocblockdocumentationdoge

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言