-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |