-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
127 lines (91 loc) · 4.84 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
if has("gui_running")
if has("mac")
else " Linux
set guifont=Ubuntu\ Mono\ 10
endif
set guioptions-=T
set guicursor+=a:blinkon0
endif
if has("termguicolors")
set termguicolors
endif
set path+=** " Allow :find to recurse downward through directories.
set history=1000 " Size of history
set tabstop=4 " Number of spaces that a <Tab> in the file counts for.
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
set expandtab " Use the appropriate number of spaces to insert a <Tab>.
" Spaces are used in indents with the '>' and '<' commands
" and when 'autoindent' is on. To insert a real tab when
" 'expandtab' is on, use CTRL-V <Tab>.
set smarttab " When on, a <Tab> in front of a line inserts blanks
" according to 'shiftwidth'. 'tabstop' is used in other
" places. A <BS> will delete a 'shiftwidth' worth of space
" at the start of the line.
set showcmd " Show (partial) command in status line.
set number " Show line numbers.
"set cursorline " Highlight current line.
set colorcolumn=80,100 "Highlight columns 80 and 100
set wildmenu " Visual autocomplete for command menu.
set lazyredraw " Redraw only when needed.
set showmatch " When a bracket is inserted, briefly jump to the matching
" one. The jump is only done if the match can be seen on the
" screen. The time to show the match can be set with
" 'matchtime'.
set hlsearch " When there is a previous search pattern, highlight all
" its matches.
set incsearch " While typing a search command, show immediately where the
" so far typed pattern matches.
set ignorecase " Ignore case in search patterns.
set smartcase " Override the 'ignorecase' option if the search pattern
" contains upper case characters.
set backspace=eol,start,indent " Influences the working of <BS>, <Del>, CTRL-W
" and CTRL-U in Insert mode. This is a list of items,
" separated by commas. Each item allows a way to backspace
" over something.
set autoindent " Copy indent from current line when starting a new line
" (typing <CR> in Insert mode or when using the "o" or "O"
" command).
"set textwidth=79 " Maximum width of text that is being inserted. A longer
" line will be broken after white space to get this width.
set formatoptions=c,q,r,t " This is a sequence of letters which describes how
" automatic formatting is to be done.
"
" letter meaning when present in 'formatoptions'
" ------ ---------------------------------------
" c Auto-wrap comments using textwidth, inserting
" the current comment leader automatically.
" q Allow formatting of comments with "gq".
" r Automatically insert the current comment leader
" after hitting <Enter> in Insert mode.
" t Auto-wrap text using textwidth (does not apply
" to comments)
set ruler " Show the line and column number of the cursor position,
" separated by a comma.
set background=dark " When set to "dark", Vim will try to use colors that look
" good on a dark background. When set to "light", Vim will
" try to use colors that look good on a light background.
" Any other value is illegal.
set mouse=a " Enable the use of the mouse.
set autoread " Autoread when file is changed from another source.
set hidden " Hide a buffer instead of closing it when switching to
" a new buffer.
"set nowrap " Don't wrap lines, even softly.
set whichwrap+=<,>,h,l,[,] " h,l, and arrow keys do not wrap at the start/end
" of lines unless you tell it to.
" Change the leader key
let g:mapleader = " "
let g:maplocalleader = " "
" Turn off search highlight
nnoremap <leader><space> :nohlsearch<CR>
" Delete buffer while preserving window layout (splits)
command Bd bp|bd #
" Enable detection of filetype and activate associated settings
filetype plugin indent on
syntax on
" Keep my plugin settings in a different file for cleanliness
source ~/.vim/plugins.vim
" NOTE: Color scheme must be after sourcing plugins.vim because we install
" some colorschemes as 'plugins'
colorscheme molokai
"colorscheme quantum
"colorscheme PaperColor