-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
115 lines (90 loc) · 2.38 KB
/
.vimrc
File metadata and controls
115 lines (90 loc) · 2.38 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
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
set nocompatible
" General appearance and behaviour
filetype plugin indent on
syntax on
set visualbell t_vb=
set noerrorbells
set ruler
set showcmd
set showmatch
set wildmenu
set wildmode=list:longest,full
set backspace=indent,eol,start
set nowrap
set linebreak
set lazyredraw
set number
set nomodeline
" MOUSE with VIM ! (YES)
set mouse=a
set ttymouse=xterm2
set scrolloff=1
" Indentation options
set autoindent
set expandtab
set softtabstop=2
set shiftwidth=2
set tabstop=2
set virtualedit=block
set equalprg=
" Search options
set incsearch
set hlsearch
"set lines=50 columns=100
if has("gui_running")
"Maximize gvim window.
set lines=999 columns=999
endif
let g:NERDTreeWinSize=50
set gfn=Inconsolata\ 11
set guifont=Inconsolata\ 11
source /usr/share/vim/vim72/mswin.vim
behave mswin
nmap <D-[> <<
nmap <D-]> >>
vmap <D-[> <gv
vmap <D-]> >gv
set backupdir=/var/vim/backup
set directory=/var/vim/
colorscheme 256_xoria
if has("autocmd")
" DRUPAL SETTINGS
augroup module
autocmd BufRead,BufNewFile *.module set filetype=php
autocmd BufRead,BufNewFile *.install set filetype=php
autocmd BufRead,BufNewFile *.test set filetype=php
augroup END
" autocompletion
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
" auto-open taglist on programming files
autocmd BufRead,BufNewFile * if &ft == 'python' | execute "TlistOpen" | endif
autocmd BufRead,BufNewFile * if &ft == 'java' | execute "TlistOpen" | endif
autocmd BufRead,BufNewFile * if &ft == 'ruby' | execute "TlistOpen" | endif
autocmd BufRead,BufNewFile * if &ft == 'php' | execute "TlistOpen" | endif
endif
" taglist settings
let Tlist_Ctags_Cmd="/opt/ctags-5.8/ctags"
" no sure if I need this yet for java autocompletion ...
"setlocal completefunc=javacomplete#CompleteParamsInfo
"inoremap <buffer> <C-X><C-U> <C-X><C-U><C-P>
"inoremap <buffer> <C-S-Space> <C-X><C-U><C-P>
if has("gui")
" set Ctrl-Space for autocompletion
inoremap <C-Space> <C-x><C-o>
endif
function! Preserve(command)
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
execute a:command
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
nmap _$ :call Preserve("%s/\\s\\+$//e")<CR>
nmap _= :call Preserve("normal gg=G")<CR>
syntax on