rc

And here we go! Added the readme file, and the Vim dotfile. There's still a lot of junk in .vimrc, but I'll remove it in the next commit, because it's some text I like to put in the history :)

Author
Vngngdn
Date
June 27, 2016, 6:08 p.m.
Hash
fd89267ad2ce01fba39fd8a2eb48c8c70cf8c5a5
Parents
Modified files
.vimrc
README.md

.vimrc

241 additions and 0 deletions.

View changes Hide changes
+
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
+
13
" VUNDLE {{{
+
14
"Vundle is used to manage plugins for Vim. It needs additional setup, so it gets priority in my .vimrc.
+
15
"Note that this part is a verbatim copy of VundleVim's GitHub page.
+
16
+
17
set nocompatible              " be iMproved, required
+
18
filetype off                  " required
+
19
+
20
" set the runtime path to include Vundle and initialize
+
21
set rtp+=~/.vim/bundle/Vundle.vim
+
22
call vundle#begin()
+
23
+
24
" let Vundle manage Vundle, required
+
25
Plugin 'VundleVim/Vundle.vim'
+
26
+
27
" 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
Plugin 'Valloric/YouCompleteMe'
+
29
+
30
" Airline provides a neat and feature rich status bar. Really nice to have.
+
31
Plugin 'bling/vim-airline'
+
32
+
33
" Bufferline will show buffers in the status bar. There's enough room anyway, so I fancied having it.
+
34
Plugin 'bling/vim-bufferline'
+
35
+
36
" Syntastic does automatic syntax checking without the need to compile.
+
37
Plugin 'scrooloose/syntastic'
+
38
+
39
" This is a fuzzy searcher. Until further notice, I still have to find out why this is awesome as fuck according to others.
+
40
Plugin 'kien/ctrlp.vim'
+
41
+
42
" This plugin enables Git intergration.
+
43
Plugin 'tpope/vim-fugitive'
+
44
+
45
" I discovered this beauty (21/11/2015 17:10 GMT+1 Brussels). It provides snippets for redundant code. Praise the hackers man.
+
46
Plugin 'SirVer/ultisnips'
+
47
+
48
" 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
Plugin 'honza/vim-snippets'
+
50
+
51
" All of your Plugins must be added before the following line
+
52
call vundle#end()            " required
+
53
filetype plugin indent on    " required
+
54
" To ignore plugin indent changes, instead use:
+
55
"filetype plugin on
+
56
"
+
57
" Brief help
+
58
" :PluginList       - lists configured plugins
+
59
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
+
60
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
+
61
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
+
62
"
+
63
" see :h vundle for more details or wiki for FAQ
+
64
" Put your non-Plugin stuff after this line
+
65
" }}}
+
66
+
67
" YOUCOMPLETEME {{{
+
68
" YouCompleteMe is a godlike completer for Vim. As such, it is worthy of its own section.
+
69
"
+
70
" This setting will force YCM to close the preview buffer after selecting the completion.
+
71
let g:ycm_autoclose_preview_window_after_completion=1
+
72
+
73
" Sets the symbol used to indicate a syntax error:
+
74
let g:ycm_error_symbol = '>>'
+
75
+
76
" Sets the symbol used to indicate a warning:
+
77
let g:ycm_warning_symbol = 'i'
+
78
+
79
" 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
let g:ycm_seed_identifiers_with_syntax=0
+
81
+
82
" 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
let g:ycm_key_list_select_completion=['<TAB>']
+
84
+
85
" Same reason; I'm a dumb fuck and arrows are still hardwired in my brain.
+
86
" Switching from azerty to qwerty is still fucking with my brain (21/11/2015).
+
87
let g:ycm_key_list_previous_completion=['<S-TAB>']
+
88
+
89
" }}}
+
90
+
91
" AIRLINE {{{
+
92
" 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
+
94
+
95
+
96
" These lines will load the powerline font for use in Airline.
+
97
if !exists('g:airline_symbols')
+
98
		let g:airline_symbols={}
+
99
endif
+
100
let g:airline_symbols.space="\ua0"
+
101
let g:airline_powerline_fonts=1
+
102
+
103
" If there is only one tab opened, the tab bar will display the different buffers.
+
104
let g:airline#extensions#tabline#enabled=1
+
105
+
106
" Makes Airline appear immediately, instead of waiting for a split.
+
107
set laststatus=2
+
108
" }}}
+
109
+
110
" ULTISNIPS {{{
+
111
" As mentioned earlier, this provides snippets to stop redundant code.
+
112
+
113
" To begin, changing default TAB, because YCM already uses TAB.
+
114
	let g:UltiSnipsExpandTrigger="<c-l>"
+
115
	let g:UltiSnipsJumpForwardTrigger="<c-j>"
+
116
	let g:UltiSnipsJumpBackwardTrigger="<c-k>"
+
117
+
118
" }}} 
+
119
"
+
120
" COLOURS & COLORS {{{
+
121
+
122
" 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
colorscheme molokai
+
124
+
125
" 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
syntax enable
+
127
" }}}
+
128
+
129
" SPACES & TABS {{{
+
130
+
131
" The number of visual spaces per TAB hit.
+
132
set tabstop=4
+
133
+
134
" Setting the amount of tabs to 4. The default is 8.
+
135
set shiftwidth=4
+
136
+
137
" This breaks lines after column 80.
+
138
set textwidth=80
+
139
" }}}
+
140
+
141
" UI CONFIGURATION {{{
+
142
+
143
" 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
set number
+
145
+
146
" This highlights the current line. Loved this back in Gedit and Notepad++, and I want it, or I'm gonna bust a tit.
+
147
set cursorline
+
148
+
149
" 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
filetype indent on
+
151
+
152
" In addition, this automatically indents shit.
+
153
set autoindent
+
154
+
155
" Ermagherd. This throws a wildmenu when you can use autocomplete to cycle trough files. GIMME GIMME
+
156
set wildmenu
+
157
+
158
" 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
set lazyredraw
+
160
+
161
" This highlights the matching parenthesis ([, {, (, ...). I think this is default, but in case it's not, tadaa.
+
162
set showmatch
+
163
" }}}
+
164
+
165
" SEARCHING {{{
+
166
+
167
" 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
set incsearch
+
169
+
170
" This will highlight all occurrences when searching on the go.
+
171
set hlsearch
+
172
+
173
" 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
nnoremap <leader><space> :nohlsearch<CR>
+
175
" }}}
+
176
+
177
" FOLDING {{{
+
178
" In case I forget (I'm Belgian), folding is hiding code parts that belong together, like functions. Très important. Fuck azerty.
+
179
+
180
" This enables folding as is.
+
181
set foldenable
+
182
+
183
" 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
set foldlevelstart=10
+
185
+
186
" 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
set foldnestmax=10
+
188
+
189
" 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
"nnoremap <space> za
+
191
+
192
" 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
"set foldmethod=indent
+
194
" }}}
+
195
+
196
" MOVEMENT {{{
+
197
+
198
" 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
nnoremap j gj
+
200
nnoremap k gk
+
201
" }}}
+
202
+
203
" BACKING UP {{{
+
204
+
205
" What these lines do, is move the backup files to the /tmp folder. This will keep my directories clean and neat.
+
206
set backup
+
207
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
+
208
set backupskip=/tmp/*,/private/tmp/*
+
209
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
+
210
set writebackup
+
211
" }}}
+
212
"
+
213
" MACROS {{{
+
214
" 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
"
+
216
" This macro is for Python classes: It takes the given word at the line, and makes a property-style handler with that word.
+
217
" }}}
+
218
" OTHER IMPORTANT STUFF {{{
+
219
+
220
" 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
set nocompatible
+
222
+
223
+
224
" 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
" Extensive explanation can also be found at https://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work#7078429
+
226
cmap w!! w !sudo tee > /dev/null %
+
227
+
228
" 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
set encoding=utf8
+
230
+
231
" This setting will allow me to switch to another buffer without need to save the current buffer.
+
232
set hidden
+
233
" }}}
+
234
+
235
" Because Vim can fold vimrc files with the right syntax, These lines will tell Vim how to handle that.
+
236
set modelines=2 "This tells Vim that the last 2 lines of this file should only apply to this file.
+
237
" 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
" To wrap a new section, look at the other sections, and copy that syntax.
+
239
" vim:foldmethod=marker
+
240
" vim:foldlevel=0
+
241

README.md

24 additions and 0 deletions.

View changes Hide changes
+
1
+
2
Yes, the dotfiles by yours truly. Hooray!
+
3
+
4
My personalised files that configure my software just how I like it. Because I
+
5
like them so much, I give everyone the option to like them as well. You're very
+
6
welcome.
+
7
+
8
## Common usage
+
9
+
10
Maybe I should mention how I tend to use these. Yeah? Yeah.
+
11
+
12
I just make a clone of my online repository, which pulls all the dotfiles to all
+
13
my devices. Then, I make a symbolic link to them in the places where they ought
+
14
to appear. And of course, a pull on boot, so I always have the most recent
+
15
versions. =3
+
16
+
17
## License
+
18
+
19
Can you put copyright on these? I wouldn't really care honestly for just some
+
20
dotfiles.
+
21
+
22
If they're copyrightable, it's under the Apache 2.0 license. I include a copy,
+
23
in case of.
+
24