Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brianhuster
Copy link
Contributor

Problems

  • Creating a new user command for 'keywordprg' makes it visible to users in 'wildmenu', even though that command is not intended to be used directly by users.

Solution:

  • Use let &l:keywordprg = ':call '..expand('<SID>')..'KeywordFunc()"' pattern instead

Problems
- Creating a new user command for 'keywordprg' makes it visible to users
  in 'wildmenu', even though that command is not intended to be used directly by users.

Solution:
- Use `let &l:keywordprg = ':call '..expand('<SID>')..'KeywordFunc()"'` pattern instead
return system('bash -c "help ' . keyword . ' 2>/dev/null"')
endif
endfunction
let &l:keywordprg=':call ' .. expand('<SID>') .. 'KeywordPrg() "'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some inconsistent use of concatenate operator . vs ...

Also, the trailing " seems wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing " is intended, to avoid Vim processing args added to the comment after that, otherwise it would cause syntax error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a big hack. When would such a thing happen?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so this is because of the default K behaviour? In that case, I'd rather not use such a hack and keep the existing behaviour of using a custom :com instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this way is at least better for GoKeywordPrg, because even before this PR, that command doesn't handle the argument

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine for me.

brianhuster and others added 2 commits October 27, 2025 09:07
@brianhuster
Copy link
Contributor Author

Why does "test_popupwin" fail?

@chrisbra
Copy link
Member

I am closing this.

@chrisbra chrisbra closed this Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants