forked from darkowlzz/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
156 lines (112 loc) · 3.16 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
set shell=/bin/bash
let mapleader = ' '
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'othree/html5.vim'
Plugin 'vim-ruby/vim-ruby'
Plugin 'hashivim/vim-vagrant'
Plugin 'puppetlabs/puppet-syntax-vim'
Plugin 'ekalinin/Dockerfile.vim'
Plugin 'gabrielelana/vim-markdown'
Plugin 'lanox/lanox-vim-theme'
Plugin 'danro/rename.vim'
Plugin 'evanmiller/nginx-vim-syntax'
Plugin 'tpope/vim-git'
Plugin 'pangloss/vim-javascript'
Plugin 'digitaltoad/vim-jade'
Plugin 'bling/vim-airline'
Plugin 'mhinz/vim-startify'
Plugin 'valloric/youcompleteme'
Plugin 'yggdroot/indentline'
Plugin 'tpope/vim-rails'
call vundle#end() " required
filetype plugin indent on " required
syntax enable
" Show line numbers
set number
" Show relative line numbers
set rnu
set autoindent
" 1 tab == 2 spaces
set shiftwidth=2
set tabstop=2
set softtabstop=2
" Auto indent
set autoindent
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs
set smartindent
set cursorline
set showmatch
" Wrap lines
set wrap
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Search as you type
set incsearch
" Show current position with a horizontal line
set ruler
" Make backspace work like most other apps
set backspace=2
" Show status line even when only one window is shown
set ls=2
" Treat long lines as break lines (useful when moving around in them)
map j gj
map k gk
" Turn on wildmenu. Wildmenu shows the available commands in statusbar
" on tab for autocompletion
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc,
" Show hidden dot files in NERDTree
let g:NERDTreeShowHidden=1
" Toggling list style in Explore
let g:netrw_liststyle=3
" Disable markdown spell check
let g:markdown_enable_spell_checking = 0
" Highlight text with red background when > 80 characters in a line
" highlight OverLength ctermbg=red ctermfg=white guibg=#592929
" match OverLength /\%81v.\+/
" Set color mode for color-limited terminals, like when on a ssh session
:set t_Co=256
" Highlight 81 and onward characters with a vertical line in the file
let &colorcolumn=join(range(81,999),",")
" Set color scheme
:colorscheme lanox
" Set relative number lines
nnoremap <leader>n :set rnu<cr>
" Install Vundle plugins
nnoremap <leader>p :PluginInstall<cr>
" Start NERDTreeToggle
nnoremap <leader>t :NERDTreeToggle<cr>
" Open Explore
nnoremap <leader>e :Explore<cr>
" Quick save
nnoremap <leader>w :w!<cr>
" Turn off highlight until the next search
nnoremap <leader>h :noh<cr>
" Toggle paste
nnoremap <leader>tp :set invpaste paste?<cr>
" Reload vimrc
nnoremap <leader>r :source ~/.vimrc<cr>
" Move tab 1 position to right
nnoremap <leader>m= :tabmove +1<cr>
" Move tab 1 position to left
nnoremap <leader>m- :tabmove -1<cr>
" Show trailing whitespace
nnoremap <leader>ws /\s\+$<cr>
" Quit all
nnoremap <leader>qq :qall<cr>
" Cabbrev for :tabnew
ca tn tabnew