thinkvim

Feature

  • 🚀Fatest StartupTime(Plugins Total:63 40-60ms)
  • 💎Modular Plugin Config
  • ⚒ Easy to use Easy to hack
  • 🌟95% plugins lazyload with dein
  • ⚡️Centerd on Coc.nvim, Denite auxiliary
  • 🎱Autocompletion by lsp which coc.nvim support
  • ⚔️ Fully customizable
  • 🌈Comfortable theme gruvbox9

Required Env

  • macos or linux
  • neovim >= 0.4.0(cause i used floatwindow,this feature support by neovim 0.4.0 above)
  • python3 support
    • pip3 install –user pynvim
  • node and yarn
  • NerdFont

Required Tool

  • rg (Ripgrep): BurntSushi/ripgrep

  • Universal ctags: ctags.io

    • mac brew install --HEAD universal-ctags/universal-ctags/universal-ctags
    • ubuntu
      1
      2
      3
      # install libjansson first
      sudo apt-get install libjansson-dev
      # then compile and install ctags
  • Rouge : sudo gem install rouge

Install

1.

1
git clone --depth=1 https://github.com/taigacute/ThinkVim.git ~/.config/nvim

2. open the nvim ,it will auto install dein and plugins,when the plugins install success,it will install coc extensions.

3. if you see the coc extesions installed success in your vim commandline .Congratulations‼️

Language servers

CocExtensions

Structure

LoadPlugins

Name Description
itchyny/lightline.vim Statusline
mengelbrecht/lightline-bufferline Tabline
neoclide/coc.nvim Autocompletaion
hona/vim-snippets Snippets

LazyLoadPlugins

Name Description
ludovicchabant/vim-gutentags Provide ctags/gtags
mhinz/vim-startify Startify
tyru/caw.vim Comment Plugins
t9md/vim-choosewin Easy to jump window
ryanoasis/vim-devicons Provide the Icons
tpope/vim-fugitive Git Plugins
junegunn/fzf.vim Search File Word
hona/dockerfile.vim Dockerfile Supporte
junegunn/vim-easyalign Easy Align
junegunn/goyo.vim Distraction-free writing
junegunn/limelight Hyperfocus-writing
Yggdroot/indentLine Indent Line
tpope/vim-repeat Operate Repeat
sbdchd/neoformat Format
yuttie/comfortable-motion.vim Scroll
chemzqm/vim-easygit Git wrapper focus on simplity and usability
chemzqm/denite-git gitlog, gitstatus and gitchanged sources
thinca/quickrun Quick Run
tpope/vim-markdown Markdown syntax highlighting
junegunn/vim-emoji emoji
simnalamburt/vim-mundo Ultimate mundo history visualizer
kana/vim-textobj-user Create your own text objects
kana/vim-operator-user Define your own custom operators
osyo-manga/vim-textobj-multiblock Handle bracket objects
machakann/vim-sandwich set of operatorandtextobject plugins to search/select/edit sandwiched textobjects.
kana/vim-operator-replace Operator to replace text with register content
rhysd/accelerated-jk Up/down movement acceleration
mg979/vim-visual-multi Multiple cursors project
terryma/vim-expand-region Visually select increasingly larger regions of text
liuchengxu/vim-which-key Find the key
easymotion/vim-easymotion Vim motions on speed
Shougo/defx.nvim Dark powered file explorer implementation
kristijanhusak/defx-icons Filetype icons for Defx
scrooloose/nerdtree File manager
Xuyuanp/nerdtree-git-plugin Nerdtree git plugin
tiagofumo/vim-nerdtree-syntax-highlight Nerdtree Synatax Highlight
scrooloose/nerdtree File manager
airblade/vim-gitgutter Git status implementation for Defx
airblade/vim-rooter Changes Vim working directory to project root
majutsushi/tagbar Displays tags in a window, ordered by scope
liuchengxu/vista.vim Viewer & Finder for LSP symbols and tags
mattn/emmet-vim coc-emmet instead
Shougo/denite.nvim Dark powered asynchronous unite all interfaces
w0rp/ale Check syntax in Vim asynchronously and fix files
othree/html5.vim HTML5 omnicomplete and syntax Worked with coc-html
neoclide/vim-jsx-improve js jsx
vim-python/python-syntax Enhanced version of the original Python syntax
Vimjas/vim-python-pep8-index A nicer Python indentation style
vim-scripts/python_match.vx Extend the % motion for Python files
tmhedberg/SimpylFold No-BS Python code folding
fatih/vim-go go development
elzr/vim-json json
cespare/vim-toml toml
vim-scripts/xml.vim xml

CoC Extensions

Name Description
coc-html html extensins
coc-emmet emmet
coc-css css
coc-imselect enhance input
coc-emoji emoji completion
coc-lists coclists
coc-snippets snippets extension instead Utilsnippets
coc-prettier Format
coc-eslint eslint check
coc-stylelint stylelint check
coc-tsserver js/ts lsp
coc-pairs pairs completion
coc-json json server
coc-python Python server
coc-highlight Highlight the cursors word, Show the css color
coc-git git extension
coc-post easy to use like postman

Custom ‼️

  • if you need some plugins which not in Thinkvim ,you can add them into the local/local_plugins.yaml, the plugins.yamlis thinkvim plugins file.
  • i think split the user plugins and thinkvim plugins in two files looks like good. this way cant break the thinkvim and easy to use.if you dont like local you can delete it .it doesnt effect thinkvim. but my advice is you can use local unless you have vimscript skill and you grasp this config

ColorScheme

  • The theme is gruvbox9,Works fine with neoclide/vim-jsx-improve,I create a new syntax group which provide the highlight of jsxEndComponentName in neoclide/vim-jsx-improve,if you wirte js/jsx, you will find the color very similar like vscode-gruvbox
  • The Color of other Languages are same as gruvbox,maybe some little change.

Statusline

  • Lightline Themegruvbox9



  • When the file is editing, you will found a pen in statusline .

  • When used coc-prettier,coc-tsserver,coc-snippet, the statsuline will show the icon.

    extension icon
    coc-prettier
    coc-tsserver
    coc-snippet
    go file

Defx.nvim

  • Defx provide more features,The defx is very fatest than nerdtree when you open multifiles.

Startify

  • Startify can only set the header and footer centerd,you can edit thecore/plugins/startify.vim,changed this numberlet g:startify_padding_left = 40 until the file area centerd on your screen

Operate key

  • Default leader SPACE localleader; ,The vim keymap in mappings.vim,Plugins keymap in core/plugins/allkey.vim
  • Insertkey like emacs
  • if you find the keymap doesnt work , Or the keymap doesnt show in this keylist but in allkey.vim ,you can create
    a isse. Welcome PR.
Keys Mode Description
Ctrl + w Insert delete the whole word
Ctrl + h Insert delete BackSpace
Ctrl + d Insert delete a single char
Ctrl + u Insert delete to the beginning of the line
Ctrl + b Insert move left
Ctrl + f Insert move rght
Ctrl + a Insert move the head of line
Ctrl + e Insert move the end of line
Ctrl + p Command move up
Ctrl + b Command move left
Ctrl + f Command move right
Ctrl + a Command move the head of line
Ctrl + e Command move the end of line
Ctrl + d Command move the cursors char
Ctrl + h Command delete BackSpace
Ctrl + S Insert save
Ctrl + Q Insert save and exit
Ctrl + o Insert create a new line
] + b Normal pre buffer
[ + b Normal next buffer
Ctrl + x Normal delte buffer
Y Normal copy utils the end
j Normal gj
k Normal gk
j Visual gj
k Visual gj
- Noraml ChooseWin
, + Space Normal Delete trailing spaces
[ + a Normal Ale next
] + a Normal Ale pre
[ + c Normal coc next
] + c Normal coc prev
] + ] Normal jump to prev go func
[ + [ Normal jump to next go func
gc Normal caw.vim comment
gcc Normal caw.vim uncomment
ga Normal EasyAlign
ga Visual EasyAlign
sa Normal operatore-surround prefix
sd Normal operatore-surround prefix
sr Normal operatore-surround prefix
saa Normal operatore-surround textobj-multiblock-i
sdd Normal operatore-surround textobj-multiblock-a
srr Normal operatore-surround textobj-multiblock-a
v Visual vim-expand-region
V Visual vim-expand-region
  • Window
Keys Mode Description
Ctrl + h Normal move to left window
Ctrl + l Noraml move to right window
Ctrl + j Normal move to down window
Ctrl + k Normal move to up window
Ctrl + w [ Normal the width of window reduce 3
Ctrl + w ] Normal the width of window increase 3
Ctrl + f Normal Window scrolling down
Ctrl + b Normal Window scrolling up
Ctrl + d Normal Window scrolls down half a screen
Ctrl + u Normal Window scrolls up half a screen
  • Tab
Keys Mode Description
<Leader> + tn Normal create tab
<Leader> + te Normal edit tab
<Leader> + tm Normal move tab
  • LeaderKey
Keys Mode Description
<Leader> + number Normal number[0-9] choose buffer
<Leader> + ca Normal CocDiagnostics
<Leader> + cc Normal CocCommands
<Leader> + ce Normal CocExtensions
<Leader> + cj Normal Cocnext
<Leader> + ck Normal CocPrev
<Leader> + co Normal CocOutline
<Leader> + cr Normal CocResume
<Leader> + cs Normal CocIsymbols
<Leader> + G Normal open Goyo
<Leader> + m Normal open mundo
<Leader> + w Normal save file
<Leader> + - Normal ChooseWin
<Leader> + s Normal open Startify
<Leader> + d Normal open Dash
<Leader> + p Normal Edit the file which in plugins folder
<Leader> + cf Normal coc Format
<Leader> + fc Normal fzf chage vim colorscheme
<Leader> + ff Normal fzf find files
<Leader> + fr Normal fzf rg search
<Leader> + fv Normal fzf Vista Finder
<Leader> + b Normal fzf find buffer
<Leader> + fw Normal fzf rg search the cursor word
<Leader> + fgc Normal fzf gitcommits
<Leader> + fbc Normal fzf gitbcommits
<Leader> + <Leader> + w Normal Easymotion jump to donw
<Leader> + <Leader> + b Normal Easymotion jump to up
<Leader> + <Leader> + f Normal Easymotion search for jump
<Leader> + gr Normal vim-go GoRename
<Leader> + goi Normal vim-go GoInfo
<Leader> + god Normal vim-go GoDoc
<Leader> + gor Normal vim-go GoRun
<Leader> + gob Normal vim-go GoBuild
<Leader> + got Normal vim-go GoTest
<Leader> + goc Normal vim-go GoCoverage
<Leader> + gov Normal vim-go GoDef
  • LocalLeaderKey
Keys Mode Description
<LocalLeader> + t Normal Open Tagbar
<LocalLeader> + r Normal QuickRun
<LocalLeader> + v Normal Open Vista
<LocalLeader> + da Normal TodoAdd Add todo
<LocalLeader> + ga Normal Gadd
<LocalLeader> + gd Normal Gdiff
<LocalLeader> + gc Normal Gcommit
<LocalLeader> + gb Normal Gblame
<LocalLeader> + gB Normal GBrowse
<LocalLeader> + gS Normal GStatus
<LocalLeader> + gp Normal Gpush
<LocalLeader> + gl Normal Denite show all git log
<LocalLeader> + gh Normal Denite show git branch
  • Denite
Keys Mode Description
<LocalLeader> + m Normal Denite Menu
Denite Doaction
i Denite Open filter buffer
d Denite Delete
p Denite Preview
st Denite tabopen
sv Denite Vsplit
si Denite Split
' Denite QuickMove
q Denite Quit
r Denite RedRaw
yy Denite Yank
<Esc> Denite Quit
<C-u> Denite Restore Source
<C-f> Denite call Defx
<C-x> Denite Choose Action
<Space> Denite Toggle Select
<Esc> Denite Filter Quit
q Denite Filter Quit
<C-c> Denite Filter Quit filter
<kk> Denite Filter insert move window
<kk> Denite Filter normal move window
<jj> Denite Filter insert move window
<jj> Denite Filter normal move window
  • Defx
Keys Mode Description
<Leader> + e Normal open defx
N Defx touch new file
K Defx touch new folder
<CR> Defx open file or folder
l Defx open file or folder
dd Defx delete
r Defx rename
. Defx show ignore files
h Defx Return to the parent directory
q Defx exit defx
s Defx Open in rightwindow vs
i Defx Open file sp
yy Defx copy the path of file
\ Defx show the path of file
c Defx copy
m Defx move
p Defx paste
<Space> Defx multi
gf Defx open in denite
gr Defx search in denite
w Defx increase the width
  • CoC
Keys Mode Description
Tab Select Jump
Tab Insert completion donw
Shit + Tab Insert completion up
Ctrl + n Insert completion down
Ctrl + p Insert completion up
Ctrl + Space Normal Forced trigger completion
<CR> Insert/Select Confirm
K Normal Show the function doc
gd Normal jump to defined
gy Normal coc-type-definition
gi Normal coc-implementation
gr Normal coc-references
[ + g Normal coc-git-prechunk
] + g Normal coc-git-nextchunk
gs Normal git chunkinfo
  • Feature For Go
Keys Mode Description
zl Normal Denite Outline
zT Normal Denite Goroot
  • TextObject
Keys Mode Description
vif Go textobject
vaf Go textobject
aF Python textobject
iF Python textobject