Skip to content

Instantly share code, notes, and snippets.

@gcnyin
Last active June 7, 2021 04:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gcnyin/7a3a35ecf9fb28bf0f273a49ac28c451 to your computer and use it in GitHub Desktop.
Save gcnyin/7a3a35ecf9fb28bf0f273a49ac28c451 to your computer and use it in GitHub Desktop.
my vim configuration
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
Plug 'ntpeters/vim-better-whitespace'
call plug#end()
set autoindent
set expandtab
set shiftround
set shiftwidth=4
set smarttab
set tabstop=4
filetype indent plugin on
set hlsearch
set incsearch
set ignorecase
set smartcase
set complete-=i
set lazyredraw
set display+=lastline
set encoding=utf-8
set linebreak
set scrolloff=1
set sidescrolloff=5
syntax on
colorscheme gruvbox
set wrap
set laststatus=2
set backspace=indent,eol,start
set history=100
set ruler
set wildmenu
set tabpagemax=50
set cursorline
set number
set noerrorbells
set visualbell
set title
set background=dark
set spell
" Let's save undo info!
if !isdirectory($HOME."/.vim")
call mkdir($HOME."/.vim", "", 0770)
endif
if !isdirectory($HOME."/.vim/undodir")
call mkdir($HOME."/.vim/undodir", "", 0700)
endif
set undofile
set undodir=~/.vim/undodir
set pastetoggle=<F9> "make vim paste format correctly
@gcnyin
Copy link
Author

gcnyin commented Aug 1, 2020

Install vim-plug

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment