This repository has been archived by the owner on May 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.after
44 lines (37 loc) · 1.42 KB
/
vimrc.after
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
" Some shortcuts
map \c :!ctags --extra=+f -R *<CR><CR>
" somehow when shell is /bin/zsh it doesn't recognize the correct path (e.g.
" ruby or ctags)
" map ,s :set shell=/bin/bash<CR>
set shell=/bin/bash
" Ignore .hg directories (espacially in CrtlP).
set wildignore+=*/.hg/*
" Somehow the ZoomWin default mapping (<C-W>o) deletes other windows.
" Note that this mapping will cause error if <leader> is not remapped (to
" something else like ',').
map \\ :ZoomWin<CR>
" More history
set history=100
" condigure dictionary shortcut
"map \D :set dict=/usr/share/dict/words<CR>
" From the vim wiki:
" Append modeline after last line in buffer.
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX
" files.
function! AppendModeline()
let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d :",
\ &tabstop, &shiftwidth, &textwidth)
let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
call append(line("$"), l:modeline)
endfunction
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
" Taken from: destroyallsoftware.com
" Make the current working window big while compact the others to be
" large enough for context. Taken from destroyallsoftware screencasts:
" set winwidth=84
" " We have to have a winheight bigger than we want to set winminheight. But if
" " we set winheight to be huge before winminheight, the winminheight set will
" " fail.
" set winheight=5
" set winminheight=5
" set winheight=999