-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
63 lines (51 loc) · 1.11 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
set nocompatible
filetype off
" Load plugins
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
call vundle#end()
filetype plugin indent on
" Some options
set tabstop=4
set autoindent
set copyindent
set number
set relativenumber
set softtabstop=4
set shiftwidth=4
set shiftround
set showmatch
set ignorecase
set showcmd
set smartcase
set smarttab
set hlsearch
set incsearch
set mouse=a
" Allow ; to be used instead of :
nnoremap ; :
" Map keys for pane navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" No arrow keys!
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
" Go to next line in editor instead of next full line
nnoremap j gj
nnoremap k gk
" NERDTree
map <C-n> :NERDTree<CR>
if executable('xclip')
"copy the given range (or the current line) using xclip
command! -range Xclip <line1>,<line2>!tee >(xclip -i -selection clipboard)
endif
" Forgot to use `sudo` for editing a file that requires root?
cmap w!! w !sudo tee % >/dev/null
" Lastly, enable syntax highlighting
syntax on