/
Lohkrii.vimrc
89 lines (67 loc) · 1.83 KB
/
Lohkrii.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
" w'ere using VI Improved, use it then. Just a conf since this should happen auto
set nocompatible
" Search while I type, with highlighting, only using case if i do
set ignorecase
set smartcase
set incsearch
set hls
" Shift/Tab
filetype plugin indent on
" vim.wikia.com/wiki/indenting_source_code
" improve tab functionality
set smartindent smarttab noexpandtab
" Size of tab
set tabstop=4 shiftwidth=4
" no vertical scroll
set nowrap
set textwidth=0
" Randomness
" Always show some kind of status
set laststatus=2
set statusline=
set statusline+=%f
set statusline+=%r
set statusline+=%m
set statusline+=%=
set statusline+=%y
set statusline+=\ %p%%
set statusline+=\ %l:%c
" turn on line numbering.
set number
set visualbell errorbells ruler
" Joining the darkside...
set mouse=a
" Put some vertical space around the cursor
set scrolloff=2
" Fix trailing whitespace so they are periods
set list
set listchars=eol: ,tab:\|\ ,trail:.
" Make non text more visible
highlight NonText guifg=#4a4a59 guibg=#4a4a59
" Setup Persistent undo
set undofile
set undodir=~/.undo
" Key maps
map <leader>n :NERDTreeToggle <CR>
map <C-t> :tabnew <CR>
map <C-/> <Plug>NERDComToggleComment!
" Plugins
execute pathogen#infect()
" Change colorscheme from default to solarized
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
" Automatically create .backup directory, writable by the group.
if filewritable("~/") && ! filewritable("~/.backup")
silent execute '!umask 002; mkdir ~/.backup'
endif
set backupdir=~/.backup directory=~/.backup
" CtrlP Fixes
let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40
let g:ctrlp_working_path_mode = 'a'
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git\|optimize'
" Extra add-ons
" Setting custom indent for JavScripts files
autocmd Filetype javascript setlocal ts=2 sts=2 sw=2 expandtab