golint-fixer.vim : A vim tool for fix goling warnings, which generate by vim-go or ale.
script karma |
Rating 2/2,
Downloaded by 890 |
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 |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.117.156.19
|