-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.vim
104 lines (75 loc) · 3.55 KB
/
vimrc.vim
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
set nocompatible " required for improvement (don't us Vim compatible options)
filetype off " required for Vundle (loading it's plugins)
" set the RunTime Path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" can also use a path where we want to install plugins like -
" call vundle#begin('~/path')
" Beginning of Plugins
"Vundle managing Vundle
Plugin 'VundleVim/Vundle.vim'
"status/tabline for vim that's light as air
Plugin 'vim-airline/vim-airline'
"Autocomplete
Plugin 'Valloric/YouCompleteMe'
"Auto pair brackets
Plugin 'jiangmiao/auto-pairs'
"For various colors
Plugin 'flazz/vim-colorschemes'
"provides support for expanding abbreviations
Plugin 'mattn/emmet-vim'
"Plugin 'L9'
" End of Plugins
call vundle#end()
filetype plugin indent on " required (added after Vundle stuff)
colorscheme molokai_dark " awesome color
syntax enable " enable syntax processing
set showmode " show what mode we're currently editing in
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing(spaces removed in backspacing)
set expandtab " tabs are spaces
set shiftwidth=4 " number of spaces to use for auto-indenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set autoindent " always set autoindenting on
set number " show line numbers
set relativenumber " relative number display (current line as zero)
set showcmd " shows the last command entered in the very bottom right of vim
set cursorline " horizontally highlight the line cursor is on
set wildmenu " visually autocomplete for command menu (shows graphical menu to cycle through)
set lazyredraw " redraw the screen only when it is needed
set showmatch " highlight matching brackets
set smartcase " ignore case if search pattern is all pattern is all lowercase otherwise case-sensitive
set ttyfast " you got a fast terminal (connection b/w terminal is increased)
set incsearch " search as characters are entered
set hlsearch " highlight the word matches you're on
set foldenable " enable folding (shows all folds)
set foldlevelstart=10 " open most folds by default (setting to 10 ensures only very nested blocks are folded)
set foldnestmax=10 " 10 nested fold max as folds can be nested
set foldmethod=indent " fold based on indent level (very useful for python users)
set pastetoggle=<F2> " paste mode, where you can paste mass data that won't be autoindented (press F2 in insert mode)
set laststatus=2
" Setting cursor where mouse button is clicked
" set mouse=a
" mapleader is now comma as using it is easy
let mapleader=","
" move around lines visually
" if there's a very long line thats get visually wrapped to two lines, 'j' won't skip over the 'fake' part of the visual line in favor of the next 'real' line
nnoremap j gj
nnoremap k gk
" move to beginning/end of line
nnoremap B ^
nnoremap E $
" $/^ map to do anything
nnoremap $ <nop>
nnoremap ^ <nop>
" turning off search highlight when we want
nnoremap <leader><space> :nohlsearch<CR>
" space open/closes folds
nnoremap <space> za
" Remaping the <esc> key to jk
inoremap jk <esc>
" Allowing capitol W and Q
nnoremap Q q
nnoremap W w
" toggle gundo (undo the thing which you want to from the undo tree)
nnoremap <leader>u :GundoToggle<CR>