Last active
June 7, 2021 04:13
-
-
Save gcnyin/7a3a35ecf9fb28bf0f273a49ac28c451 to your computer and use it in GitHub Desktop.
my vim configuration
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim