sponsor Vim development Vim logo Vim Book Ad

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

 script karma  Rating 2/2, Downloaded by 948  Comments, bugs, improvements  Vim wiki

created by
tenfy zhong
 
script type
ftplugin
 
description
Install

Use a plugin manager

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

Manual

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

vim-go or ale

Usage

Use vim-go or ale to lint check. It'll add the warning to the quickfix or loclist.
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
 
install details
mkdir -p ~/.vim/bundle
mv golint-fixer.vim.tar.gz ~/.vim/bundle
cd ~/.vim/bundle
tar xzf golint-fixer.vim.tar.gz
echo 'rtp+=~/.vim/bundle/golint-fixer' >> ~/.vimrc
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
golint-fixer.vim.tar.gz 1.0.0 2017-06-05 8.0 tenfy zhong Initial upload
ip used for rating: 216.73.216.103

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github