2024-02-19 20:41:48 +01:00
|
|
|
" Install vim-plug if not found
|
|
|
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
|
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
|
|
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
endif
|
|
|
|
|
|
|
|
" Run PlugInstall if there are missing plugins
|
|
|
|
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
|
|
|
\| PlugInstall --sync | source $MYVIMRC
|
|
|
|
\| endif
|
|
|
|
|
2024-02-19 18:32:37 +01:00
|
|
|
call plug#begin()
|
|
|
|
|
2024-09-12 16:38:21 +02:00
|
|
|
Plug 'tpope/vim-sensible'
|
2024-02-19 18:32:37 +01:00
|
|
|
Plug 'preservim/nerdtree'
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
Plug 'xuyuanp/nerdtree-git-plugin'
|
2024-09-11 17:15:51 +02:00
|
|
|
Plug 'flazz/vim-colorschemes'
|
2024-02-19 18:32:37 +01:00
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
nnoremap <C-t> :tabnew<CR>
|
|
|
|
nnoremap <C-r> :tabclose<CR>
|
|
|
|
nnoremap <C-Left> :tabprevious<CR>
|
|
|
|
nnoremap <C-Right> :tabnext<CR>
|
|
|
|
nnoremap <C-Up> <C-w>W
|
|
|
|
nnoremap <C-Down> <C-w>w
|
|
|
|
nnoremap <M-Up> <C-w>5+
|
|
|
|
nnoremap <M-Down> <C-w>5-
|
|
|
|
nnoremap <M-Left> <C-w>5<
|
|
|
|
nnoremap <M-Right> <C-w>5>
|
|
|
|
|
|
|
|
nnoremap <C-e> :vsplit<CR>
|
|
|
|
nnoremap <C-q> :q<CR>
|
|
|
|
|
|
|
|
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
|
|
|
|
|
|
|
|
" nnoremap <C-n> :NERDTree<CR>
|
|
|
|
nnoremap <C-y> :NERDTreeFocus<CR>
|
2024-02-22 09:10:07 +01:00
|
|
|
|
2024-08-07 09:12:11 +02:00
|
|
|
set list listchars=tab:>-,trail:.,extends:>
|
|
|
|
|
2024-02-22 09:10:07 +01:00
|
|
|
set tabstop=2
|
|
|
|
set shiftwidth=2
|
|
|
|
set softtabstop=2
|
|
|
|
set expandtab
|
2024-09-11 17:15:51 +02:00
|
|
|
|
|
|
|
colorscheme chalkboard
|