-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvimrc
More file actions
156 lines (112 loc) · 3.92 KB
/
Copy pathvimrc
File metadata and controls
156 lines (112 loc) · 3.92 KB
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
148
149
150
151
152
153
154
155
156
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
if &term == "xterm" || &term == "xterm-256color"
set t_Co=256
endif
" set our tabs to four spaces
set smartindent
set sw=4
set ts=4
" turn syntax highlighting on by default
syntax on
" set auto-indenting on for programming
set ai
" turn off compatibility with the old vi
set nocompatible
" Make mouse middle click paste without formatting it.
map <MouseMiddle> <Esc>"*p
" Better modes. Remeber where we are, support yankring
set viminfo=!,'100,\"100,:20,<50,s10,h,n~/.viminfo
" Move Backup Files to ~/.vim/sessions
set backupdir=~/.vim/sessions
set dir=~/.vim/sessions
" Turn off annoying swapfiles
set noswapfile
" turn on the "visual bell" - which is much quieter than the "audio blink"
set vb
" do not highlight words when searching for them. it's distracting.
set nohlsearch
" highlight search terms incrementally
set incsearch
" automatically show matching brackets. works like it does in bbedit.
set showmatch
" do NOT put a carriage return at the end of the last line! if you are programming
" for the web the default will cause http headers to be sent. that's bad.
set binary noeol
" make that backspace key work the way it should
set backspace=indent,eol,start
" turn-off toolbar
set guioptions-=T
" turn-off scrollbar
set guioptions-=L
set guioptions-=r
" add line numbers
set nu
" don't wrap lines
set nowrap
" login to shell
set shell=bash\ --login
" allow tab completion of buffers
set wildchar=<Tab> wildmenu wildmode=full
" map [jj] to Esc and Write in insert mode
inoremap jj <Esc>:w<CR>
inoremap ;; <End>;<Esc>:w<CR>
" Create Blank Newlines and stay in Normal mode
nnoremap <silent> zj o<Esc>
nnoremap <silent> zk O<Esc>
" Show the full path of the current file
noremap ff :echo expand('%:p')<CR>
" Show the full path of the current file and add it to a yank register
noremap cp :let @" = expand("%:p")<CR>
" Make window movement easier
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
noremap <C-h> <C-w>h
" Remove all trailing whitespace from file and save
noremap <C-S> :%s/\s\+$//g<CR>:w<CR>
" Swap ; and : Convenient.
nnoremap ; :
nnoremap : ;
noremap _ :ls<CR>:b
noremap rp :PromptVimTmuxCommand
noremap rl :RunLastVimTmuxCommand
noremap ri :InspectVimTmuxCommand
noremap rx :CloseVimTmuxCommand
" noremap dos :e ++ff=dos<CR>:w<CR>
colorscheme molokai
" set line number color
highlight LineNr guifg=#666666
highlight ColorColumn ctermbg=black guibg=#1f1f1f
set colorcolumn=72
set ruler
" highlight things that we find with the search
set hlsearch
"{{{Taglist configuration
let Tlist_Use_Right_Window = 1
let Tlist_Enable_Fold_Column = 0
let Tlist_Highlight_Tag_On_BufEnter = 0
let Tlist_Exit_OnlyWindow = 1
let Tlist_Use_SingleClick = 1
let Tlist_Show_One_File = 1
let Tlist_Inc_Winwidth = 0
let Tlist_Ctags_Cmd = "vimctags"
"}}}
"map <F8> :!vimctags -f ./tags -h ".php.tao" -R --exclude="\.svn" --totals=yes --tag-relative=yes --PHP-kinds=+cf --regex-PHP="/abstract class ([^ ]*)/\1/c/" --regex-PHP="/interface ([^ ]*)/\1/c/" --regex-PHP="/(public |static |abstract |protected |private )+function ([^ (]*)/\2/f/"
autocmd FileType html,htmldjango,jinjahtml,eruby,mako,twig let b:closetag_html_style=1
autocmd FileType html,xhtml,xml,htmldjango,jinjahtml,eruby,mako source ~/.vim/bundle/closetag/plugin/closetag.vim
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
"Treat .tao files as php and .twig files as html
au BufNewFile,BufRead *.tao set filetype=php
au BufNewFile,BufRead *.twig set filetype=html
filetype indent plugin on
" abbreviations
ab dcm /**<CR> * @param <CR>* @return void<CR>*/<Esc><Up><Up>$i
ab pubm /**<CR> * @param <CR>* @return void<CR>*/<CR><Backspace>public function()<CR>{<CR><CR>}<Esc>kkk%hi
ab privar /**<CR> * @var <CR>*/<CR>private $
ab provar /**<CR> * @var <CR>*/<CR>protected $
ab pubvar /**<CR> * @var <CR>*/<CR>public $
let g:dwm_map_keys=0
" expand tabs to spaces
set expandtab
let NERDTreeIgnore = ['\.pyc$']