Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madskjeldgaard/cppman.nvim
Search cppman (cplusplus.com and cppreference) from within neovim
https://github.com/madskjeldgaard/cppman.nvim
cpp cppman lua neovim neovim-plugin nvim nvim-plugin
Last synced: about 18 hours ago
JSON representation
Search cppman (cplusplus.com and cppreference) from within neovim
- Host: GitHub
- URL: https://github.com/madskjeldgaard/cppman.nvim
- Owner: madskjeldgaard
- Created: 2022-10-08T14:52:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T08:36:52.000Z (about 1 year ago)
- Last Synced: 2023-10-30T09:33:38.685Z (about 1 year ago)
- Topics: cpp, cppman, lua, neovim, neovim-plugin, nvim, nvim-plugin
- Language: Lua
- Homepage:
- Size: 433 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CPPMan.nvim
![in action](cppman.gif)
A NeoVim plugin with a simple interface for the [cppman cli tool](https://github.com/aitjcize/cppman), allowing you to easily search cplusplus.com and cppreference.com without ever leaving neovim.
Plugin inspired by [vim-cppman](https://github.com/gauteh/vim-cppman)
## Installation
Install using packer. Note that [nui.nvim](https://github.com/MunifTanjim/nui.nvim) is a requirement.
```lua
-- cppman
use {
'madskjeldgaard/cppman.nvim',
requires = {
{ 'MunifTanjim/nui.nvim' }
},
config = function()
local cppman = require"cppman"
cppman.setup()-- Make a keymap to open the word under cursor in CPPman
vim.keymap.set("n", "cm", function()
cppman.open_cppman_for(vim.fn.expand(""))
end)-- Open search box
vim.keymap.set("n", "cc", function()
cppman.input()
end)end
}
```## Usage
Run `:CPPMan` without any arguments to get a search prompt or with an argument to search for a term: `:CPPMan std::array`
## Navigation
Once the manual has been open it's possible to navigate through the documentation using the same keybindings of the standalone cppman program, in normal mode:
* **K**, **** and **<2-LeftMouse>**: allows to follow the word under cursor
* **\** and **\**: go back to the previous page