forked from Vodurden/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
107 lines (93 loc) · 2.6 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
" Disable vi compatibility mode
set nocompatible
" Windows Compatibility {
" On windows we want to force '.vim' instead of vimfiles'
" this makes it easier to use across systems.
if has('win32') || has('win64')
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
endif
" }
" Bundles {
filetype off
set rtp+=$HOME/.vim/bundle/vundle
call vundle#rc()
" Github Based {
Bundle 'gmarik/vundle'
Bundle 'altercation/vim-colors-solarized'
Bundle 'wincent/Command-T'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'Valloric/YouCompleteMe'
" }
" Vim-Scripts Based {
Bundle 'a.vim'
Bundle 'taglist.vim'
" }
filetype plugin indent on
" }
" Filetype associations {
if has("autocmd")
"Make .hpp, .h, .cpp, .c files all use the cpp configuration settings located
"in bundle/file-config/after/ftplugin/cpp.vim
autocmd BufNewFile,BufRead *.h,*.hpp,*.c,*.cpp setfiletype cpp
endif
" }
" User Interface {
" Colours {
set background=dark
colorscheme solarized
syntax on
" }
" Font {
if has("gui_running")
if has("gui_gtk2")
set guifont=Inconsolata\ 12
elseif has("gui_win32") " Different font for windows
set guifont=Consolas:h11:cANSI
endif
endif
" }
" Searching {
set incsearch
set ignorecase
set smartcase
set showmatch
set diffopt=filler,iwhite "Ignore all whitespace
set showmatch " Show matching braces
" }
" }
" Formatting {
set encoding=utf-8 "The one true encoding
set clipboard+=unnamed " Yanks go to cliboard
set title " Inherit vim's title, not the terminals
set hidden " Allows multiple buffer managing
set backspace=indent,eol,start " Lazy backspace
set number " Line Numbers
set scrolloff=5 "Leave at least 5 lines up/down the cursor
set scrolljump=5 " Lines to scroll when the cursor leaves the screen
set history=1000 " Remeber more commands!
set autochdir
set ttyfast
set noerrorbells
set relativenumber
" Tabs {
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set autoindent
" }
" }
" Key bindings {
let mapleader = ","
" Easy windows {
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
" }
"
nnoremap ; :
" }
" Supertab
let g:SuperTabDefaultCompletionType = "context"