-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
46 lines (38 loc) · 970 Bytes
/
.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
" My .vimrc
" Automatically install vim-plug
""""""""""""""""""""""""""""""""""""""""""""""""
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
""""""""""""""""""""""""""""""""""""""""""""""""
" Settings
set showmode
set incsearch
set nu
set rnu
set so=0
set nowrap
set smartindent
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
" Plugins
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-commentary'
call plug#end()
" Key remaps
let mapleader=" "
" Comment lines
map <leader>/ gcc
" Toggle file explorer
nmap <leader>t :NERDTreeToggle<cr>
" Autoinstall missing plugins on startup
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q
\| endif