-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
147 lines (108 loc) · 2.76 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
" Barebones vimrc
" Outsourcting basic stuff to sensible.vim
set nocompatible
" Sensible.vim is supposed to do this. Syntastic says otherwise
set shell=/bin/bash
" good amount of time to type ,ev etc
set timeoutlen=2000
" Pathogen
execute pathogen#infect()
" Fuck Esc
inoremap jk <esc>
inoremap <esc> <nop>
" Remap leader
let mapleader = ","
let g:mapleeader = ","
" My Leader commands
" clear search highlights with ,spc
nnoremap <leader><space> :noh<cr>
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
" Toggle paste mode
set pastetoggle=<F2>
" 8601 Timestamp
command -nargs=0 -bar Timestamp execute "normal! a\<c-R>=strftime(\"%FT%T%z\")\<cr>"
" Cmus
command Cmusplay :!cmus-remote -p
command Cmuspause :!cmus-remote -u
command Cmusnext :!cmus-remote -n
command Cmusprev :!cmus-remote -r
" Xmonad
command Xmonedit :vsplit ~/.xmonad/xmonad.hs
command Xmoncompile :!xmonad --recompile
" insert rfc 8601 date
command Date :r!date
" Remap window navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-j> <C-w>k
nnoremap <C-l> <C-w>l
" Remove bad habits with nop
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
map <Up> <Nop>
map <Down> <Nop>
map <Left> <Nop>
map <Right> <Nop>
let g:hardtime_default_on = 1
set wildignore=*.o,*~,*.pyc
set textwidth=80
" Hide abandoned buffer
set hid
set ignorecase
set smartcase
set hlsearch
set incsearch
set whichwrap+=<,>,h,l
set showmatch
" Fuck bells
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" 256 colors in gnome-terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
" Fuck gui crap
if has("gui_running")
set guioptions-=T
set guioptions-=e
set t_Co=256
set guitablabel=%M\ %t
endif
set encoding=utf8
set ffs=unix,dos,mac
" Fuck swaps
set nobackup
set nowb
set noswapfile
set clipboard =unnamedplus
set expandtab
set shiftwidth=4
set tabstop=4
set relativenumber
set spell spelllang=en_us
" Return to last edit position when opening file
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Yaml indents
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" Markdown
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
" Format the status line
set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
let g:slime_target = "tmux"
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Ultisnip
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
colorscheme wombat256