All Projects → RishabhRD → nvim-cheat.sh

RishabhRD / nvim-cheat.sh

Licence: other
cheat.sh integration for neovim in elegant way

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to nvim-cheat.sh

Lualine.nvim
A blazing fast and easy to configure neovim statusline written in pure lua.
Stars: ✭ 198 (+52.31%)
Mutual labels:  neovim-plugin
sphinx.nvim
Sphinx integrations for Neovim
Stars: ✭ 64 (-50.77%)
Mutual labels:  neovim-plugin
vim-readme-viewer
📖 Viewing plugin's README easily like vim help
Stars: ✭ 26 (-80%)
Mutual labels:  neovim-plugin
Nvim Go
Go development plugin for Neovim written in pure Go
Stars: ✭ 207 (+59.23%)
Mutual labels:  neovim-plugin
Vim Ghost
Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
Stars: ✭ 245 (+88.46%)
Mutual labels:  neovim-plugin
ftFT.nvim
I love highlights! I love f{char}!
Stars: ✭ 28 (-78.46%)
Mutual labels:  neovim-plugin
Vim Packager
Vim plugin manager that utilizes "jobs" and "pack" features.
Stars: ✭ 197 (+51.54%)
Mutual labels:  neovim-plugin
fwatch.nvim
fwatch.nvim lets you watch files or directories for changes and then run vim commands or lua functions.
Stars: ✭ 57 (-56.15%)
Mutual labels:  neovim-plugin
Coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Stars: ✭ 18,268 (+13952.31%)
Mutual labels:  neovim-plugin
cmp-tmux
Tmux completion source for nvim-cmp and nvim-compe
Stars: ✭ 98 (-24.62%)
Mutual labels:  neovim-plugin
Lush.nvim
Define Neovim themes as a DSL in lua, with real-time feedback.
Stars: ✭ 204 (+56.92%)
Mutual labels:  neovim-plugin
Vim Vsnip
Snippet plugin for vim/nvim that supports LSP/VSCode's snippet format.
Stars: ✭ 224 (+72.31%)
Mutual labels:  neovim-plugin
package-info.nvim
✍️ All the npm/yarn commands I don't want to type
Stars: ✭ 248 (+90.77%)
Mutual labels:  neovim-plugin
Lsp Status.nvim
Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
Stars: ✭ 201 (+54.62%)
Mutual labels:  neovim-plugin
auto-session
A small automated session manager for Neovim
Stars: ✭ 688 (+429.23%)
Mutual labels:  neovim-plugin
Neovim Ruby
Ruby support for Neovim
Stars: ✭ 202 (+55.38%)
Mutual labels:  neovim-plugin
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (-46.15%)
Mutual labels:  neovim-plugin
bad-practices.nvim
A plugin to help give up bad practices in vim.
Stars: ✭ 41 (-68.46%)
Mutual labels:  neovim-plugin
nvim-config
My neovim config
Stars: ✭ 63 (-51.54%)
Mutual labels:  neovim-plugin
faq
Русскоязычный проект помощи начинающим дедам-программистам 30+, 40+, 50+
Stars: ✭ 142 (+9.23%)
Mutual labels:  cheetsheet

nvim-cheat.sh

cheat.sh integration for neovim.

nvim-cheat.sh provides elegant UI and remove complexity of url handling and special symbols for users.

Screenshots

Installation

Install with your favorite plugin manager. For example with vim-plug:

Plug 'RishabhRD/popfix'
Plug 'RishabhRD/nvim-cheat.sh'

Working

The plugin exports 4 commands:

  • Cheat
  • CheatWithoutComments
  • CheatList
  • CheatListWithoutComments

Each command accepts 0 or more arguments. Arguments decide the initial prompt text.

CheatWithoutComments search the query but don't display the (optional) comments.

Example:

:Cheat
:Cheat cpp reverse number
:CheatWithoutComments
:CheatWithoutComments cpp reverse number

First and third command opens the prompt to search with and without comments respectively.

Second and fourth command opens the prompt with initial prompt text cpp reverse number to search with and without comments respectively.

CheatList and CheatListWithoutComments provides fuzzy finding from all available symbols.

Changing result layout

By default result is displayed in a floating window. However, this may be disturbing for some users. Hence, nvim-cheat.sh provides a global variable g:cheat_default_window_layout with which users can set their default layout.

Example:

vim.g.cheat_default_window_layout = 'split'

Possible values are:

  • split
  • vertical_split
  • tab
  • float

Note: If provided any wrong value, float will be used.

How to query

Plugin behavior is similar to cheat.sh behavior.

The first word should be the language for query. (e.g. cpp)

Rest of words define the query. (e.g. sum of digits)

An example query:

cpp sum of digits

Try to put the language name matching vim filetype for the corresponding language. This would also enable syntax highlighting for result. Example: using javascript for javascript language would produce syntax highlighting. However, using js for javascript would not as vim recognise javascript as filetype not js.

For having different results for the same query append \1, \2, etc to query similar to classic cheat.sh.

Example: cpp read file\1

Keymaps

Keymaps for prompt are:

In insert mode:

  • <CR> : Open result in default layout.
  • <C-x> : Open result in horizontal split.
  • <C-t> : Open result in a new tab.
  • <C-v> : Open result in a vertical split.
  • <C-y> : Open result in floating window.
  • <C-f> : Open result in floating window.
  • <C-c> : Close window without any action.
  • <C-p> : Previous in history
  • <C-n> : Next in history

In normal mode:

  • <CR> : Open result in default layout.
  • <C-x> : Open result in horizontal split.
  • <C-t> : Open result in a new tab.
  • <C-v> : Open result in a vertical split.
  • <C-y> : Open result in floating window.
  • <C-f> : Open result in floating window.
  • <C-c> : Close window without any action.
  • <Esc> : Close window without any action.
  • q : Close window without any action.
  • k : Previous in history
  • j : Next in history
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].