-
Notifications
You must be signed in to change notification settings - Fork 2
/
vimrc
90 lines (68 loc) · 1.36 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
set nocompatible
filetype on
filetype indent on
filetype plugin on
filetype plugin indent on
set encoding=utf-8
set number
set relativenumber
set autoindent
set showmatch
set cursorline
set wrap
set showcmd
set showmode
set wildmenu
set laststatus=2
" search
set hlsearch
set incsearch
set ignorecase
set smartcase
set mouse=a
set clipboard^=unnamed,unnamedplus
set encoding=utf-8
" enable 256 colors
set t_Co=256
" transform tab to whitespace
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set scrolloff=10
let mapleader=' '
syntax on
" plugins
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-surround'
Plug 'Lokaltog/vim-easymotion'
call plug#end()
" key mapping
inoremap jj <esc>
nnoremap J 5j
nnoremap K 5k
nnoremap <leader>wq :wq<CR>
nnoremap <leader>q :q<CR>
nnoremap <Backspace> :nohl<CR>
nnoremap J 5j
nnoremap K 5k
" navigate
nnoremap <leader>w <c-w>w
nnoremap <leader>h <c-w>h
nnoremap <leader>j <c-w>j
nnoremap <leader>k <c-w>k
nnoremap <leader>l <c-w>l
" split
nnoremap <leader>sv :vsplit<CR>
nnoremap <leader>sh :split<CR>
" copy & paste
vnoremap <C-y> "+y
nnoremap <C-p> "*p
" airline
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_left_sep=''
let g:airline_right_sep=''
let g:airline#extensions#tabline#formatter = 'default'