All Projects → emacsorphanage → go-add-tags

emacsorphanage / go-add-tags

Licence: other
Add field tags for struct fields

Programming Languages

emacs lisp
2029 projects
Makefile
30231 projects

go-add-tags.el travis badge melpa badge melpa stable badge

Add field tags for struct fields. This package is inspired by GoAddTags of vim-go.

Screencast

Screencast of go-add-tags. Insert tags for struct fields with M-x go-add-tags

Installation

go-add-tags is available on MELPA and MELPA stable

You can install go-add-tags with the following command.

M-x package-install [RET] go-add-tags [RET]

Interfaces

go-add-tags

Insert tag at current line. You can input multiple tags at once by comma, like json,yaml. If region is enabled, then tags are inserted in lines in region. And current-prefix-key is specified, then you can choose field style function.

Customization

go-add-tags-style(Default: 'snake-case)

How to convert field in tag from field name.

  • snake-case
  • lower-camel-case
  • upper-camel-case
  • original

Sample Configuration

(custom-set-variables
 '(go-add-tags-style 'lower-camel-case))

(with-eval-after-load 'go-mode
  (define-key go-mode-map (kbd "C-c t") #'go-add-tags))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].