" Set variables set number set relativenumber set autoindent set expandtab set tabstop=4 set shiftwidth=4 set smarttab set softtabstop=4 set mouse=a set termguicolors " Use system clipboard set clipboard+=unnamedplus " My leader key is space let mapleader = " " " Close NERDTree when I open something in it let g:NERDTreeQuitOnOpen = 1 " C is cool let g:c_syntax_for_h = 1 let g:lightline = { \ 'colorscheme': 'catppuccin', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] \ }, \ 'component_function': { \ 'gitbranch': 'FugitiveHead' \ }, \ } " Plugins call plug#begin() Plug 'catppuccin/nvim', { 'as': 'catppuccin' } " Status & tab bars Plug 'itchyny/lightline.vim' " Automaticly create closing bracket Plug 'windwp/nvim-autopairs' " Plugin for comfortable navigating Plug 'preservim/nerdtree' " Plugin for surround text in something faster Plug 'kylechui/nvim-surround' " Plugin for snippets Plug 'dcampos/nvim-snippy' " Plugin for git integration Plug 'tpope/vim-fugitive' call plug#end() autocmd VimEnter * \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | q \| endif autocmd TermOpen * setlocal nonumber norelativenumber " Set mappings " Toggle files tree nmap y :NERDTreeToggle " Navigate in splits nmap k :wincmd k nmap j :wincmd j nmap h :wincmd h nmap l :wincmd l " Switch tabs nmap H :tabp nmap L :tabn " Edit size of split nmap :resize +5 nmap :resize -5 nmap :vertical resize -5 nmap :vertical resize +5 " Hide search highlighting nmap n :nohlsearch " Saving time to not write ":Git " nmap g :Git " Terminal nnoremap t :terminali tnoremap " For snippets imap snippy#can_expand_or_advance() ? '(snippy-expand-or-advance)' : '' imap snippy#can_jump(-1) ? '(snippy-previous)' : '' smap snippy#can_jump(1) ? '(snippy-next)' : '' smap snippy#can_jump(-1) ? '(snippy-previous)' : '' xmap (snippy-cut-text) " Create blank like below or above nmap zj ok nmap zk Oj " Setupping colorscheme catppuccin-frappe lua require('nvim-surround').setup() lua require('nvim-autopairs').setup() " lua require('toggleterm').setup()