Do you have any tools that teach you how to use functions in the Vim plug-in or Linux tool?

Asked 2 years ago, Updated 2 years ago, 99 views

The languages we use are Python and C/C++, and we are looking for tools in our language environments that can teach us how to use functions like PyCharm and CLion.

These IDEs are all you need to do, but I'm familiar with Vim plug-ins and commands, so I'm looking for a tool that I can deploy without compromising my current operating environment.

Is there anyone who knows?Thank you for your cooperation.

python c++ linux c vim

2022-09-30 19:17

2 Answers

If you really want to translate it into Japanese, you'll need the Japanese document first, and then you'll need to work with the tools to browse it
The quickest way to do this is to use Web data such as Python 3.7.3 document
For example, if you want to use a web browser w3m that can be used in a terminal, change the function written by the previous queueu1829 and do the following

 function!s:pyhelp(word)abort
    execute'terminal++ close w3m-o confirm_qq=0 https://docs.python.org/ja/3/library/functions.html\\#'.a:word
endfunction
command!-nargs=1PyHelp call<SID>pyhelp(<f-args>)
setlocal keywordprg= —PyHelp

Execute can be used as well as other browsers, or Firefox can be used if you have never used a CLI browser before.


2022-09-30 19:17

Answer on the assumption that the vim configuration is under through /.vim.

Create c.vim and python.vim in ~/vim/ftplugin and add Shift+k.
If I remember correctly, by default, will read c.vim, but if it doesn't work, please add .vim.

$catc.vim
let$MANPAGER="vim-M+MANPAGER-" 
if has('terminal')
    let&l:keywordprg=':terminal++close++norestore man3'
    " or
    "let&l:keywordprg=":vertical terminal++close++norestore man3"
else
    let&l:keywordprg='man3'
endif
$cat python.vim
"Uncomment for your needs.
US>"let$LESS=substate($LESS, '--quit-if-one-screen\>', '', 'g')
if has('terminal')
    let&l:keywordprg=':terminal++close++norestore pydoc3
    " or
    "let&l:keywordprg=":vertical terminal++close++norestore pydoc3"
else
    let&l:keywordprg='pydoc3'
endif

For more information, try :help keywordprg in vim.

If you want to translate man into Japanese, you can install manpages-ja and manpages-ja-dev for Debian/Ubuntu descent.

 sudo apt install manpages-ja manpages-ja-dev

Unfortunately, pydoc3 cannot be translated into Japanese.For more information, see Can I translate pydoc/pydoc3 into Japanese?


2022-09-30 19:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.