rc

Added a section to the readme explaining the naming convention, and removed the diary cruft from the .vimrc file.

Author
Vngngdn
Date
June 27, 2016, 6:12 p.m.
Hash
4d59f602f76f0ff8316c0941d754b6add124a2c0
Parent
fd89267ad2ce01fba39fd8a2eb48c8c70cf8c5a5
Modified files
.vimrc
README.md

.vimrc

0 additions and 10 deletions.

View changes Hide changes
1
1
"If lost please return to owner.
2
-
"Or hack the shit outta it. Don't know if this is copyrightable or not, but if it is, I release it under GNU FDL version 3 (or if you want, any later version) and CC-BY-SA 4.0 (or if you want, any later version). You can choose one or more of these to abide to.
3
-
"That's the legal shit. Fuck internet laws. They're like Windows <insert number>. coming up with it takes giant amounts of heroin.
4
-
"I started writing this file at 10th October 2015, few minutes after 17:30 GMT+2 (Belgium, summer time). Frankly with the least amount of Vim knowledge necessary to actually write a damn text file. Every time I'm hacking I feel ashamed I didn't know about this marvellous editor before.
5
-
"That hacking today is merely mucking around in Java, following my university's object oriented courses. I wanted Python =(. Everyone must program in Python first. Spam and eggs > foos and bars.
6
-
"Well at least it's not PHP. I loathe that shit. But hey, so much for that sobbing. If you want more sobbing check out my blog. PHP free, batteries included. =)
7
-
"So yeah, after reading and listening to Vim Creep (http://norfolkwinters.com/vim-creep/) I was sold. Sold and I set out for myself to learn this and show it to my friends when they walk by my laptop. Occasionally. Only the friends that can value informatics.
8
-
"Everyone should learn Vim. I haven't ever used it, I started using it one month ago (counting from 10th October, see above), literally. I'm already convinced that this is thé main tool for every programmer. Visual Studio can fuck off with Intellisense. And everything proprietary too. Free (as in freedom) software conquers the world in the background. And I got a meet and greet behind the scenes.
9
-
"I'm wrapping up now. This is becoming a blog instead of a useful file. Wish me luck. I'm gonna listen Vim Creep one more time now.
10
-
11
-
"I'll most certainly add comments to every fucking line I write. It goes without saying that I need to know what every line does.
12
2
13
3
" VUNDLE {{{
14
4
"Vundle is used to manage plugins for Vim. It needs additional setup, so it gets priority in my .vimrc.
15
5
"Note that this part is a verbatim copy of VundleVim's GitHub page.
16
6
17
7
set nocompatible              " be iMproved, required
18
8
filetype off                  " required
19
9
20
10
" set the runtime path to include Vundle and initialize
21
11
set rtp+=~/.vim/bundle/Vundle.vim
22
12
call vundle#begin()
23
13
24
14
" let Vundle manage Vundle, required
25
15
Plugin 'VundleVim/Vundle.vim'
26
16
27
17
" YCM is a plugin that allows Vim semantic type checking and more programming mumbo jumbo. It is godlike and it must always be there for me.
28
18
Plugin 'Valloric/YouCompleteMe'
29
19
30
20
" Airline provides a neat and feature rich status bar. Really nice to have.
31
21
Plugin 'bling/vim-airline'
32
22
33
23
" Bufferline will show buffers in the status bar. There's enough room anyway, so I fancied having it.
34
24
Plugin 'bling/vim-bufferline'
35
25
36
26
" Syntastic does automatic syntax checking without the need to compile.
37
27
Plugin 'scrooloose/syntastic'
38
28
39
29
" This is a fuzzy searcher. Until further notice, I still have to find out why this is awesome as fuck according to others.
40
30
Plugin 'kien/ctrlp.vim'
41
31
42
32
" This plugin enables Git intergration.
43
33
Plugin 'tpope/vim-fugitive'
44
34
45
35
" I discovered this beauty (21/11/2015 17:10 GMT+1 Brussels). It provides snippets for redundant code. Praise the hackers man.
46
36
Plugin 'SirVer/ultisnips'
47
37
48
38
" In addition to UltiSnips, this plugin contains a prefetched repository of snippets. Must have, because I'm not planning on writing all of those by myself.
49
39
Plugin 'honza/vim-snippets'
50
40
51
41
" All of your Plugins must be added before the following line
52
42
call vundle#end()            " required
53
43
filetype plugin indent on    " required
54
44
" To ignore plugin indent changes, instead use:
55
45
"filetype plugin on
56
46
"
57
47
" Brief help
58
48
" :PluginList       - lists configured plugins
59
49
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
60
50
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
61
51
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
62
52
"
63
53
" see :h vundle for more details or wiki for FAQ
64
54
" Put your non-Plugin stuff after this line
65
55
" }}}
66
56
67
57
" YOUCOMPLETEME {{{
68
58
" YouCompleteMe is a godlike completer for Vim. As such, it is worthy of its own section.
69
59
"
70
60
" This setting will force YCM to close the preview buffer after selecting the completion.
71
61
let g:ycm_autoclose_preview_window_after_completion=1
72
62
73
63
" Sets the symbol used to indicate a syntax error:
74
64
let g:ycm_error_symbol = '>>'
75
65
76
66
" Sets the symbol used to indicate a warning:
77
67
let g:ycm_warning_symbol = 'i'
78
68
79
69
" Fills the identifier completion database with the language's keywords (e.g., when starting a new Java file, "class" will already be in the completion engine.
80
70
let g:ycm_seed_identifiers_with_syntax=0
81
71
82
72
" This setting tells YCM what keys to use to accept completion. I removed <Down> as default, because I'm a silly coder and still use my arrow keys to navigate my source files. Hey, years of negligence for Vim leaves its marks. To think I ever thought Notepad++ was the best editor ever, the fuck...
83
73
let g:ycm_key_list_select_completion=['<TAB>']
84
74
85
75
" Same reason; I'm a dumb fuck and arrows are still hardwired in my brain.
86
76
" Switching from azerty to qwerty is still fucking with my brain (21/11/2015).
87
77
let g:ycm_key_list_previous_completion=['<S-TAB>']
88
78
89
79
" }}}
90
80
91
81
" AIRLINE {{{
92
82
" Airline is a great status bar plugin. Although it can behave quirky if Powerline is not on the scene. These scripts are dedicated to handle that behaviour.
93
83
94
84
95
85
96
86
" These lines will load the powerline font for use in Airline.
97
87
if !exists('g:airline_symbols')
98
88
		let g:airline_symbols={}
99
89
endif
100
90
let g:airline_symbols.space="\ua0"
101
91
let g:airline_powerline_fonts=1
102
92
103
93
" If there is only one tab opened, the tab bar will display the different buffers.
104
94
let g:airline#extensions#tabline#enabled=1
105
95
106
96
" Makes Airline appear immediately, instead of waiting for a split.
107
97
set laststatus=2
108
98
" }}}
109
99
110
100
" ULTISNIPS {{{
111
101
" As mentioned earlier, this provides snippets to stop redundant code.
112
102
113
103
" To begin, changing default TAB, because YCM already uses TAB.
114
104
	let g:UltiSnipsExpandTrigger="<c-l>"
115
105
	let g:UltiSnipsJumpForwardTrigger="<c-j>"
116
106
	let g:UltiSnipsJumpBackwardTrigger="<c-k>"
117
107
118
108
" }}} 
119
109
"
120
110
" COLOURS & COLORS {{{
121
111
122
112
" A colour scheme for my Vim. Recommended by some source I consider trustworthy (http://dougblack.io/words/a-good-vimrc.html). He (She? (It? it's 2015, gotta take "it" into account.)) uses Badwolf, but Molokai apparantly uses bolding (making text fatter, I'm Shakespeare 2.0) which I like.
123
113
colorscheme molokai
124
114
125
115
" Enables syntax processing. Might as well take my liver as well since I can't live without syntax processing either. Vim really is a life saver huh? :)
126
116
syntax enable
127
117
" }}}
128
118
129
119
" SPACES & TABS {{{
130
120
131
121
" The number of visual spaces per TAB hit.
132
122
set tabstop=4
133
123
134
124
" Setting the amount of tabs to 4. The default is 8.
135
125
set shiftwidth=4
136
126
137
127
" This breaks lines after column 80.
138
128
set textwidth=80
139
129
" }}}
140
130
141
131
" UI CONFIGURATION {{{
142
132
143
133
" Seriously. If Vim wasn't so barebones, I'd have spammed the mailing list to make this default. But because Vim is completely customizable, I think it's good I have to manually add this. BTW, this creates line numbers.
144
134
set number
145
135
146
136
" This highlights the current line. Loved this back in Gedit and Notepad++, and I want it, or I'm gonna bust a tit.
147
137
set cursorline
148
138
149
139
" Detects filetype, and loads the appropriate language indentation files. I love this. It's so cumbersome to constantly hit TAB because of readability. Also Python needs this.
150
140
filetype indent on
151
141
152
142
" In addition, this automatically indents shit.
153
143
set autoindent
154
144
155
145
" Ermagherd. This throws a wildmenu when you can use autocomplete to cycle trough files. GIMME GIMME
156
146
set wildmenu
157
147
158
148
" So apparantly, Vim has a tendency to redraw the entire screen when it's not really necessary. This tells it to only redraw when unnecessary. If menus don't disappear, I think this is the line to comment out first.
159
149
set lazyredraw
160
150
161
151
" This highlights the matching parenthesis ([, {, (, ...). I think this is default, but in case it's not, tadaa.
162
152
set showmatch
163
153
" }}}
164
154
165
155
" SEARCHING {{{
166
156
167
157
" What this does, is, when you type a character to search, Vim automatically goes to the first occurrence. When refining the search, it does that again. So searching goes that bit faster.
168
158
set incsearch
169
159
170
160
" This will highlight all occurrences when searching on the go.
171
161
set hlsearch
172
162
173
163
" Problem with hlsearch is that it does not turn off the highlighting. So searching for vowels may quickly result in everything being highlighted. This is a mapping. It will remove highlighting when entering \<SPACE>
174
164
nnoremap <leader><space> :nohlsearch<CR>
175
165
" }}}
176
166
177
167
" FOLDING {{{
178
168
" In case I forget (I'm Belgian), folding is hiding code parts that belong together, like functions. Très important. Fuck azerty.
179
169
180
170
" This enables folding as is.
181
171
set foldenable
182
172
183
173
" This setting determines how many folds have to be opened. The number indicates the folding level. So 0 = every possible folding is folded. 99 = practically everything is open. I'm using 10, since I already have a problem with more than 3 nested loops.
184
174
set foldlevelstart=10
185
175
186
176
" This setting blocks overuse of nested foldings. I don't know how this will turn out in LISP/Scheme, but I'll be damned if this setting does more harm than good.
187
177
set foldnestmax=10
188
178
189
179
" This setting is commented by default, but included in case I start to grow hate for the current way Vim handles folding (za). It basically maps that command to spacebar. I may map it to z because then I only have to type one letter and RETURN, that's 33% of my time saved! =3
190
180
"nnoremap <space> za
191
181
192
182
" Again, because Python is thé best programming language ever made (not perfect, but still the best), folding based on indentation is imperative. This command does exactly that. Who needs {}? Although this causes it to not care about {} folding. Other acceptable values are marker, manual, expr, syntax, diff.
193
183
"set foldmethod=indent
194
184
" }}}
195
185
196
186
" MOVEMENT {{{
197
187
198
188
" When you go up, and you have a line going over multiple lines because it's too long, the standard mapping will skip that. These two settings will block that behaviour.
199
189
nnoremap j gj
200
190
nnoremap k gk
201
191
" }}}
202
192
203
193
" BACKING UP {{{
204
194
205
195
" What these lines do, is move the backup files to the /tmp folder. This will keep my directories clean and neat.
206
196
set backup
207
197
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
208
198
set backupskip=/tmp/*,/private/tmp/*
209
199
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
210
200
set writebackup
211
201
" }}}
212
202
"
213
203
" MACROS {{{
214
204
" Macros are the FSM's present to the glorious users of Vim. They make my life a breeze, so I declare a couple of them right here.
215
205
"
216
206
" This macro is for Python classes: It takes the given word at the line, and makes a property-style handler with that word.
217
207
" }}}
218
208
" OTHER IMPORTANT STUFF {{{
219
209
220
210
" Disables Vi compatibility. All stop using Vi. It's proprietary, shitty, fucked up, and as useless as Windows Notepad. Might as well use Ed. Besides, there's no place for Vi in the Church of Emacs, vi vi vi is the editor of the beast.
221
211
set nocompatible
222
212
223
213
224
214
" I found this gem on Reddit. If I'm editing a file that's read only, and I started Vim without sudo, then this little line will do just that for me. All I have to do is use "w!!" when saving.
225
215
" Extensive explanation can also be found at https://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work#7078429
226
216
cmap w!! w !sudo tee > /dev/null %
227
217
228
218
" This is a goodie that I forgot (added 06/11/2015 22:54 Brussels Winter time (Yes, I still haven't set Git up properly, so timestamp): It says Vim to use UTF-8 encoding.
229
219
set encoding=utf8
230
220
231
221
" This setting will allow me to switch to another buffer without need to save the current buffer.
232
222
set hidden
233
223
" }}}
234
224
235
225
" Because Vim can fold vimrc files with the right syntax, These lines will tell Vim how to handle that.
236
226
set modelines=2 "This tells Vim that the last 2 lines of this file should only apply to this file.
237
227
" So as you can see, the last 2 lines get a special vim:-prefix, so Vim knows for sure this is what's important.
238
228
" To wrap a new section, look at the other sections, and copy that syntax.
239
229
" vim:foldmethod=marker
240
230
" vim:foldlevel=0
241
231

README.md

7 additions and 0 deletions.

View changes Hide changes
1
1
2
2
Yes, the dotfiles by yours truly. Hooray!
3
3
4
4
My personalised files that configure my software just how I like it. Because I
5
5
like them so much, I give everyone the option to like them as well. You're very
6
6
welcome.
7
7
8
8
## Common usage
9
9
10
10
Maybe I should mention how I tend to use these. Yeah? Yeah.
11
11
12
12
I just make a clone of my online repository, which pulls all the dotfiles to all
13
13
my devices. Then, I make a symbolic link to them in the places where they ought
14
14
to appear. And of course, a pull on boot, so I always have the most recent
15
15
versions. =3
16
16
17
17
## License
+
18
+
19
I was originally going to leave off the cruft like "." and "rc" from the files,
+
20
so ".vimrc" would become "vim". I opt against that, because that breaks with a
+
21
lot of conventions that depend on the exact name of those files, to figure out
+
22
which syntax highlighting to use.
+
23
+
24
## License
18
25
19
26
Can you put copyright on these? I wouldn't really care honestly for just some
20
27
dotfiles.
21
28
22
29
If they're copyrightable, it's under the Apache 2.0 license. I include a copy,
23
30
in case of.
24
31