" Ada's Vim config — lightweight and close to Neovim setup " Encoding and basics scriptencoding utf-8 set nocompatible " Leader let mapleader = " " " UI set number set relativenumber set cursorline set signcolumn=yes set termguicolors " Indentation set expandtab set shiftwidth=2 set tabstop=2 set smartindent " Search set ignorecase set smartcase set incsearch " Files set noswapfile set undofile " Performance set updatetime=200 set timeoutlen=400 " Splits set splitbelow set splitright " Clipboard (prefer system clipboard if available) if has('unnamedplus') set clipboard=unnamedplus endif " Keymaps nnoremap j gj nnoremap k gk nnoremap w :w nnoremap q :q nnoremap h :nohlsearch " Windows nnoremap sv v nnoremap sh s nnoremap se = nnoremap sx :close " Buffers nnoremap :bnext nnoremap :bprevious " Quickfix nnoremap ]q :cnext nnoremap [q :cprev " Autocommands augroup AdaCore autocmd! " Resize splits equally on terminal resize autocmd VimResized * tabdo wincmd = " Disable auto comment on new line autocmd FileType * setlocal formatoptions-=o formatoptions-=r augroup END " ------------------------------ " Plugin manager: vim-plug (auto-bootstrap) " ------------------------------ if empty(glob('~/.vim/autoload/plug.vim')) && !exists('$VIM_SKIP_PLUG_BOOTSTRAP') silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif call plug#begin('~/.vim/plugged') " Theme (Nord for Vim) Plug 'arcticicestudio/nord-vim' " Fuzzy finder (fzf) Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' " File tree Plug 'preservim/nerdtree' " Editing helpers Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' " Git signs Plug 'airblade/vim-gitgutter' " Statusline Plug 'itchyny/lightline.vim' " Optional: LSP-like features via coc.nvim (uncomment if needed) " Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() " Colorscheme try colorscheme nord catch colorscheme default endtry " Lightline theme to match colors let g:lightline = { 'colorscheme': 'nord' } " NERDTree toggle nnoremap e :NERDTreeToggle " FZF mappings nnoremap ff :Files nnoremap fg :Rg nnoremap fb :Buffers nnoremap fh :Helptags " Better terminal colors for fzf in Vim let g:fzf_layout = { 'down': '~40%' } " If coc.nvim is enabled, you may want additional mappings/settings. " See vim/vimrc comments or vim/README.md for tips.