Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
Add cheat.sh-vim plugin. Set coc ErrorSign color to #FF5500
Browse files Browse the repository at this point in the history
  • Loading branch information
PasiBergman committed Jan 4, 2021
1 parent 250e7e6 commit 1c06b72
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ npm install -g neovim

```shell
sudo apt update && sudo apt upgrade -y
sudo apt install zsh git curl python3 python3-pip tmux neovim fzf ripgrep -y
sudo apt install zsh git curl python3 python3-pip -y
sudo apt install tmux neovim fzf ripgrep software-properties-common -y
# Install oh my zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install nvm (node version manager)
Expand Down
1 change: 0 additions & 1 deletion general/settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,4 @@ autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" You can't stop me
cmap w!! w !sudo tee %
" Set viminfo (for startify)
set shada=!,'100,n$HOME/.config/nvim/files/info/viminfo
1 change: 1 addition & 0 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ source $HOME/.config/nvim/plug-config/vim-floaterm.vim
source $HOME/.config/nvim/plug-config/vim-commentary.vim
source $HOME/.config/nvim/plug-config/vimspector.vim
source $HOME/.config/nvim/plug-config/maximizer.vim
source $HOME/.config/nvim/plug-config/cheat.sh-vim.vim
" source $HOME/.config/nvim/plug-config/vim-vue-plugin.vim
" Must be after theme selection
source $HOME/.config/nvim/plug-config/vim-hexokinase.vim
Expand Down
26 changes: 26 additions & 0 deletions plug-config/cheat.sh-vim.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
" The easiest way to use this plugin is to use one of the following mappings :

" K get answer on the word under the cursor or the selection on a pager (this feature requires vim >= 7.4.1833, you can check if have the right version with : :echo has("patch-7.4.1833"))
" <leader>KK same as K but works on lines or visual selection (not working on neovim, because they killed interactive commands with :!)
" <leader>KB get the answer on a special buffer
" <leader>KR Replace your question by the answer
" <leader>KP Past the answer below your question
" <leader>KC Replay last query, toggling comments
" <leader>KE Send first error to cht.sh
" <leader>C Toggle showing comments by default see configuration
" <leader>KL Replay last query
" The plugins also provides four main commands :

" :Cheat
" :CheatReplace
" :CheatPast
" :CheatPager

let g:CheatSheetFrameworks = {
\ 'python' : ['python', 'django', ],
\ 'javascript' : ['javascript', 'node', 'react', 'vue', 'jquery'],
\}

let g:CheatSheetFrameworkDetectionMethods = {
\ 'charp' : { 'type' : 'search', 'value': '*.cs' },
\}
4 changes: 4 additions & 0 deletions plug-config/coc/coc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,7 @@ let g:coc_disable_startup_warning = 1

" Setup Prettier
command! -nargs=0 Prettier :CocCommand prettier.formatFile

" Use brighter red so that red-green colorbild can see the errors
hi CocErrorSign ctermfg=9 guifg=#ff5500

2 changes: 2 additions & 0 deletions plug-config/vim-startify.vim
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ let g:startify_bookmarks = [

let g:startify_enable_special = 0

" Set shada (vimfile) location
set shada=!,'100,n$HOME/.config/nvim/files/info/viminfo
2 changes: 2 additions & 0 deletions vim-plug/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
" Plug 'turbio/bracey.vim'
" Vue plugin
" Plug 'leafOfTree/vim-vue-plugin'
" Cheatsheet (https://cht.sh) integration
Plug 'dbeniamine/cheat.sh-vim'
endif

call plug#end()

0 comments on commit 1c06b72

Please sign in to comment.