-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
66 lines (51 loc) · 1.23 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
set nocompatible
"VUNDLE
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'jeetsukumaran/vim-buffergator'
Plugin 'altercation/vim-colors-solarized'
Plugin 'Valloric/YouCompleteMe'
Plugin 'bling/vim-airline'
call vundle#end() " required
filetype plugin indent on " required
"Options for tabs
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
"Options for toggling autoindentation
nnoremap <F12> :set invpaste paste?<CR>
set pastetoggle=<F12>
set showmode
"Options for comfortable programming
set autoindent
syntax enable
filetype plugin on
"Common options
set ignorecase
set ruler
set autowrite
set scrolloff=5
set hidden
set number
set showcmd
set laststatus=2
"Solarized colorscheme options
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
"Useful key bindings
let mapleader='\'
nnoremap <leader>n :call ToggleNumberStyle()<CR>
nnoremap j :m .+1<CR>==
nnoremap k :m .-2<CR>==
nnoremap <F2> :NERDTreeToggle<CR> "Open window with directory tree
nnoremap <F3> :BuffergatorOpen<CR>
nnoremap <F5> :silent make\|redraw!\|cc<CR>
"FUNCTIONS
function! ToggleNumberStyle()
set relativenumber!
endfunction