-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_vimrc
100 lines (75 loc) · 2.05 KB
/
dot_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
90
91
92
93
94
95
96
97
98
99
100
source $VIMRUNTIME/defaults.vim
" ----- Options -----
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
set number
set norelativenumber
set cursorline
set cursorlineopt=number
set scrolloff=4
set sidescrolloff=4
set splitbelow
set splitright
set hlsearch
set ignorecase
set background=light
set termguicolors
set laststatus=2
set ruler
set mouse=a
set listchars=tab:{-},trail:!,extends:>,precedes:<
syntax enable
" ----- Keymaps -----
nnoremap <Space> <NOP>
let g:mapleader = ' '
let g:maplocalleader = ';'
nnoremap <M-h> <C-w>h
nnoremap <M-j> <C-w>j
nnoremap <M-k> <C-w>k
nnoremap <M-l> <C-w>l
nnoremap <M-o> <C-w>o
nnoremap <M-n> :bNext<CR>
nnoremap <M-p> :bprevious<CR>
nnoremap <Leader>b :buffers<CR>:buffer<Space>
nnoremap <Left> :tabprevious<CR>
nnoremap <Right> :tabnext<CR>
nnoremap <S-Left> :tabmove -1<CR>
nnoremap <S-Right> :tabmove +1<CR>
nnoremap <Leader>t :tabnew<CR>
nnoremap <F11> :resize +2<CR>
nnoremap <F10> :resize -2<CR>
nnoremap <F12> :vertical resize +2<CR>
nnoremap <F9> :vertical resize -2<CR>
nnoremap <Bslash> :vertical wincmd =<CR>
nnoremap <Bar> :horizontal wincmd =<CR>
nnoremap <Leader>h :nohlsearch<CR>
nnoremap <Leader>H :set hlsearch!<CR>
nnoremap <Leader>n :set relativenumber!<CR>
nnoremap <Leader>ww :set list!<CR>
nnoremap <Leader>wr :set wrap!<CR>
nnoremap <Leader>vv :vsplit<CR>
nnoremap <Leader>vh :split<CR>
nnoremap <Leader>c :close<CR>
nnoremap <Leader>d :bdelete<CR>
nnoremap <Leader>w :set list!<CR>
" ------ Plugins ------
let g:airline_symbols_ascii = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='base16_material_lighter'
call plug#begin()
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'preservim/nerdtree'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-sensible'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
nnoremap <Leader>pc :PlugClean<CR>
nnoremap <Leader>ps :PlugStatus<CR>
nnoremap <Leader>pp :PlugUpdate<CR>
nnoremap <Leader>e :NERDTreeToggle<CR>