rc

Added a line to install.sh that pulls in YouCompleteMe.

Author
Vngngdn
Date
July 11, 2016, 5:46 p.m.
Hash
bfce49c5c279d2f3b391ea06179e7e7699ab666b
Parent
638bf501b8e284ac3984dcb3c1e7e54e7c9b37f3
Modified files
.vimrc
install.sh

.vimrc

3 additions and 0 deletions.

View changes Hide changes
1
1
" I'll most certainly add comments to every fucking line I write. It goes
2
2
" without saying that I need to know what every line does.
3
3
4
4
" VUNDLE {{{
5
5
" Vundle is used to manage plugins for Vim. It needs additional setup, so it
6
6
" gets priority in my .vimrc.
7
7
8
8
filetype off                  " required
9
9
10
10
" set the runtime path to include Vundle and initialize
11
11
set rtp+=~/.vim/bundle/Vundle.vim
12
12
call vundle#begin()
13
13
14
14
" let Vundle manage Vundle, required
15
15
Plugin 'VundleVim/Vundle.vim'
16
16
17
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.
18
18
" XXX: This might be removed in favor of Deoplete. It depends on whether
19
19
" Deoplete is better or not.
20
20
Plugin 'Valloric/YouCompleteMe'
21
21
22
22
" Airline provides a neat and feature rich status bar. Really nice to have.
23
23
Plugin 'bling/vim-airline'
24
24
25
25
" Bufferline will show buffers in the status bar. There's enough room anyway, so I fancied having it.
26
26
Plugin 'bling/vim-bufferline'
27
27
28
28
" Syntastic does automatic syntax checking without the need to compile.
29
29
" XXX: Might be replaced in the future in favor of Neomake, because it's
30
30
" asynchronous, and I only use NeoVim these days, honestly.
31
31
Plugin 'scrooloose/syntastic'
32
32
33
33
" A fuzzy searcher. Just CTRL+P and BAM all your files are visible.
34
34
Plugin 'kien/ctrlp.vim'
35
35
36
36
" This plugin enables Git intergration.
37
37
Plugin 'tpope/vim-fugitive'
38
38
39
39
" This provides snippets for redundant code. Praise the hackers man.
40
40
Plugin 'SirVer/ultisnips'
41
41
42
42
" 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.
43
43
Plugin 'honza/vim-snippets'
44
44
45
45
" Rust syntax files, including Syntastic integration:
46
46
" To be removed when these are added to (Neo)Vim 'upstream'.
47
47
Plugin 'rust-lang/rust.vim'
48
48
49
49
" Helps me in kicking the habit induced by things like Notepad++.
50
50
" This plugin will stay here until I've kicked the habit properly.
51
51
Plugin 'takac/vim-hardtime'
52
52
53
53
" All of your Plugins must be added before the following line
54
54
call vundle#end()            " required
55
55
filetype plugin indent on    " required
56
56
" }}}
57
57
58
58
" YOUCOMPLETEME {{{
59
59
" YouCompleteMe is a godlike completer for Vim. As such, it is worthy of its own section.
60
60
" However, I'll be trying out Deoplete in the future, which might render it
61
61
" obsolete. Until further notice, I'm keeping this beauty.
62
62
"
63
63
" This setting will force YCM to close the preview buffer after selecting the completion.
64
64
let g:ycm_autoclose_preview_window_after_completion=1
65
65
66
66
" Sets the symbol used to indicate a syntax error:
67
67
let g:ycm_error_symbol = '>>'
68
68
69
69
" Sets the symbol used to indicate a warning:
70
70
let g:ycm_warning_symbol = 'i'
71
71
72
72
" 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.
73
73
let g:ycm_seed_identifiers_with_syntax = 1
74
74
75
75
" 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...
76
76
let g:ycm_key_list_select_completion=['<TAB>']
77
77
78
78
" Same reason; I'm a dumb fuck and arrows are still hardwired in my brain.
79
79
let g:ycm_key_list_previous_completion=['<S-TAB>']
80
80
81
81
" }}}
+
82
let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
+
83
let g:ycm_confirm_extra_conf = 0 " Disables security confirmation before loading the conf.py file.
+
84
" }}}
82
85
83
86
" AIRLINE {{{
84
87
" 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 behavior.
85
88
86
89
87
90
88
91
" These lines will load the powerline font for use in Airline.
89
92
if !exists('g:airline_symbols')
90
93
		let g:airline_symbols={}
91
94
endif
92
95
let g:airline_symbols.space="\ua0"
93
96
let g:airline_powerline_fonts=1
94
97
95
98
" If there is only one tab opened, the tab bar will display the different buffers.
96
99
let g:airline#extensions#tabline#enabled=1
97
100
98
101
" Makes Airline appear immediately, instead of waiting for a split.
99
102
set laststatus=2
100
103
" }}}
101
104
102
105
" ULTISNIPS {{{
103
106
" As mentioned earlier, this provides snippets to stop redundant code.
104
107
105
108
" To begin, changing default TAB, because YCM already uses TAB.
106
109
	let g:UltiSnipsExpandTrigger="<c-l>"
107
110
	let g:UltiSnipsJumpForwardTrigger="<c-j>"
108
111
	let g:UltiSnipsJumpBackwardTrigger="<c-k>"
109
112
110
113
" }}} 
111
114
"
112
115
113
116
" HARDTIME {{{
114
117
" Some settings are required to make vim-hardtime function properly
115
118
let g:hardtime_default_on = 1 " Start hardtime immediately.
116
119
let g:hardtime_allow_different_key = 1 " Allows 'jhk', but not 'jjj'.
117
120
" Using the arrow keys is (arguably) a bad habit as well, so they're disabled:
118
121
let g:list_of_disabled_keys = ["<UP>", "<DOWN>", "<LEFT>", "<RIGHT>"]
119
122
" }}}
120
123
121
124
" COLOURS & COLORS {{{
122
125
123
126
colorscheme molokai " I like molokai. I've used badwolf, but I like popping colors.
124
127
125
128
" }}}
126
129
127
130
" SPACES & TABS {{{
128
131
129
132
" The number of visual spaces per TAB hit.
130
133
set tabstop=4
131
134
132
135
" Setting the amount of tabs to 4. The default is 8.
133
136
set shiftwidth=4
134
137
135
138
" This breaks lines after column 80.
136
139
set textwidth=80
137
140
" }}}
138
141
139
142
" UI CONFIGURATION {{{
140
143
141
144
set relativenumber  " I used to use standard numbers, but relative numbers make moving around so much easier.
142
145
set cursorline " Highlights the line currently selected by the cursor.
143
146
filetype indent on " Detects filetype on load, and loads the appropriate syntax file.
144
147
" This highlights the matching parenthesis ([, {, (, ...). I think this is default, but in case it's not, tadaa.
145
148
set showmatch " Highlights matching parenthesis on hover ("[, {, ...").
146
149
" }}}
147
150
148
151
" SEARCHING {{{
149
152
150
153
" 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>
151
154
nnoremap <leader><space> :nohlsearch<CR>
152
155
" }}}
153
156
154
157
" FOLDING {{{
155
158
" In case I forget (I'm Belgian), folding is hiding code parts that belong together, like functions. Très important. Fuck azerty.
156
159
157
160
" This enables folding as is.
158
161
set foldenable
159
162
160
163
" 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.
161
164
set foldlevelstart=10
162
165
163
166
" 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.
164
167
set foldnestmax=10
165
168
166
169
" 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
167
170
"nnoremap <space> za
168
171
169
172
" }}}
170
173
171
174
" MOVEMENT {{{
172
175
173
176
" 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.
174
177
nnoremap j gj
175
178
nnoremap k gk
176
179
" }}}
177
180
178
181
" BACKING UP {{{
179
182
180
183
" What these lines do, is move the backup files to the /tmp folder. This will keep my directories clean and neat.
181
184
set backup
182
185
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
183
186
set backupskip=/tmp/*,/private/tmp/*
184
187
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
185
188
set writebackup
186
189
" }}}
187
190
"
188
191
" NEOVIM {{{
189
192
" While it certainly is an improvement over 'vanilla' Vim, it does some things
190
193
" that keep me from using Vim as it's supposed to be; limited to no mouse usage.
191
194
" So I disable it. I'll enable it again when I've twisted my mind far enough to
192
195
" not touch my mouse again. (Not to mention some terminals don't support mouse
193
196
" control, so it's a bad habit nonetheless if you spend all your time on
194
197
" GNU/Linux distros)
195
198
set mouse=""
196
199
" }}}
197
200
"
198
201
" MACROS {{{
199
202
" }}}
200
203
" OTHER IMPORTANT STUFF {{{
201
204
202
205
203
206
" 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.
204
207
" Extensive explanation can also be found at https://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work#7078429
205
208
cmap w!! w !sudo tee > /dev/null %
206
209
207
210
208
211
" This setting will allow me to switch to another buffer without need to save the current buffer.
209
212
set hidden
210
213
" }}}
211
214
212
215
" Because Vim can fold vimrc files with the right syntax, These lines will tell Vim how to handle that.
213
216
set modelines=2 "This tells Vim that the last 2 lines of this file should only apply to this file.
214
217
" So as you can see, the last 2 lines get a special vim:-prefix, so Vim knows for sure this is what's important.
215
218
" To wrap a new section, look at the other sections, and copy that syntax.
216
219
" vim:foldmethod=marker
217
220
" vim:foldlevel=0
218
221

install.sh

3 additions and 0 deletions.

View changes Hide changes
1
1
# particulary Arch, because that's the best GNU/Linux distro =P
2
2
3
3
# The next command will install the software that I'm bound to use on my PC.
4
4
sudo pacman -S --noconfirm neovim base-devel rust vlc openssh
5
5
6
6
# Firefox:
7
7
sudo pacman -S --noconfirm firefox
8
8
# Uncomment next line for Dutch firefox translations.
9
9
sudo pacman -S --noconfirm firefox-i18n-nl
10
10
11
11
# Comment next line to stop the usual window manager from being installed.
12
12
sudo pacman -S --noconfirm sway
13
13
14
14
# To easily make use of the AUR, I'll first install Pacaur, which needs some
15
15
# special treatment up front:
16
16
cd ~/Downloads
17
17
wget https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz
18
18
tar -x -f pacaur.tar.gz
19
19
cd pacaur
20
20
makepkg -sri --noconfirm
21
21
cd ..
22
22
rm -r pacaur
23
23
cd ~
24
24
25
25
# Making a directory in which to store all repositories. It's basically a
26
26
# repository for repositories =3
27
27
mkdir Repositories
28
28
29
29
# Making some common aliases for some pieces of software
30
30
alias vi nvim
31
31
alias vim nvim
32
32
33
33
# Some Python dependencies that need to be installed
34
34
pip install paramiko
35
35
+
36
# Collecting software from the AUR:
+
37
pacaur -S vim-youcompleteme-git
+
38