Skip to content

Commit

Permalink
add vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
bepoli committed Oct 23, 2024
1 parent b074d45 commit b8438cf
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
" Vim-plug setup
let data_dir = '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

" Plugins
call plug#begin()
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-surround'
call plug#end()

" Change cursor shape in insert mode
let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"

" Options
set mouse=a

" Colors
colorscheme desert

" Autocmds
augroup vimStartup
au!
" Jump to the last known cursor position
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
augroup END

0 comments on commit b8438cf

Please sign in to comment.