:vimrc.de
โ† Back to showcase
Vim๐Ÿค– AI-generated

Vim as an IDE (coc.nvim + fzf + NERDTree)

Turns Vim into a full IDE: language support via coc.nvim (LSP), fuzzy finder, file tree, Git integration and sensible keybindings.

by @vimrc.de ยท โ˜… 60 ยท โฌ‡ 0 copies ยท #ide #coc #lsp #fzf #nerdtree #git

X Reddit HN
install curl -L https://vimrc.de/r/vim-as-an-ide-coc-nvim-fzf-nerdtree -o ~/.vimrc
vimrc.de/.vimrc
" ============================================================
"  Vim as an IDE โ€” coc.nvim (LSP), fzf, NERDTree, Git
"  Requires: vim-plug + Node.js (for coc), ripgrep, fzf
" ============================================================

call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}     " LSP / autocomplete
Plug 'preservim/nerdtree'                           " file tree
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'                             " fuzzy finder
Plug 'tpope/vim-fugitive'                           " Git
Plug 'airblade/vim-gitgutter'                       " Git diff in the gutter
Plug 'tpope/vim-commentary'                         " gcc to comment
Plug 'tpope/vim-surround'                           " cs/ds/ys for brackets
Plug 'jiangmiao/auto-pairs'                         " auto-close brackets
Plug 'vim-airline/vim-airline'                      " status line
Plug 'morhetz/gruvbox'                              " color scheme
call plug#end()

" --- Basics ---
syntax enable
filetype plugin indent on
set number relativenumber hidden
set tabstop=2 shiftwidth=2 expandtab smartindent
set ignorecase smartcase incsearch hlsearch
set updatetime=300 signcolumn=yes
set nobackup nowritebackup
let mapleader = " "

" --- Theme ---
set background=dark
if has('termguicolors') | set termguicolors | endif
silent! colorscheme gruvbox

" --- NERDTree ---
nnoremap <leader>e :NERDTreeToggle<CR>
nnoremap <leader>F :NERDTreeFind<CR>

" --- fzf ---
nnoremap <leader>p :Files<CR>
nnoremap <leader>b :Buffers<CR>
nnoremap <leader>g :Rg<CR>

" --- coc.nvim: completion & navigation ---
inoremap <silent><expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
inoremap <silent><expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> gi <Plug>(coc-implementation)
nnoremap <silent> K :call CocActionAsync('doHover')<CR>
nmap <leader>rn <Plug>(coc-rename)
nmap <leader>ca <Plug>(coc-codeaction)

" Recommended extensions (once):
" :CocInstall coc-json coc-tsserver coc-pyright coc-clangd
NORMAL57 linesvim

Comments (0)

No comments yet. Be the first.

Browse more configs on vimrc.de โ†’