Skip to content

tenfyzhong/golint-fixer.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golint-fixer.vim

Build Status

A vim tool for fix goling warnings, which generate by vim-go or ale.

Demo

golint-fixer-demo-pic

Install

Use a plugin manager

for vim-plug:
Add PlugAdd 'tenfyzhong/golint-fixer.vim' to you .vimrc if you use .

Manual

  1. clone the repo.
git clone https://github.com/tenfyzhong/golint-fixer.vim.git ~/.vim/bundle
  1. add rtp+=~/.vim/bundle/golint-fixer.vim to you .vimrc

Dependence

vim-go or ale

Usage

  1. Use vim-go or ale to lint check. It'll add the warning to the quickfix or loclist.
  2. Go to the warning line. Run command :GoLintFix or nmap <leader>lf(if used).

Command

:GoLintFix
Try to fix the warning.

Nmap

<leader>lf, if g:golint_fixer_use_default_mapping equal 1.
Try to fix the warning.

Setting

g:golint_fixer_use_default_mapping

Type: bool
Default: 1
Map <leader>lf to fix warning.
let g:golint_fixer_use_default_mapping = 1

g:golint_fixer_use_go_rename

Type: bool
Default: 1
Use :GoRename to rename identify if usable.
let g:golint_fixer_use_go_rename = 1

About

A vim tool for fix goling warnings, which generate by vim-go or ale.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published