-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
110 lines (83 loc) · 1.93 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
set nocompatible
filetype on
filetype plugin indent on
syntax on
set background=dark
" set autowrite
set ruler
set modelines=0
set history=500
set laststatus=2
set viminfo='1000,f1
" show line numbers, absolute and relative
" set number
" set relativenumber
" Change the leader key
" set mapleader=",";
" Switch between buffers without saving
set hidden
set autoindent
set shiftwidth=4
set tabstop=8
set smarttab
set hlsearch
autocmd BufNewFile,BufRead *.auto set filetype=php
autocmd BufNewFile,BufRead initialize.php nnoremap <buffer> 'n 'dI//jI//jI//jI//jI//'b
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd Filetype html,xml,xsl source ~/.vim/scripts/closetag.vim
set ignorecase
set smartcase
set gdefault
set foldenable
set foldmethod=indent
" Key Maps
"
" disable arrow keys
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
nnoremap j gj
nnoremap k gk
"
"map colon to spacebar
nmap <space> :
nmap * *``
"
" bubble lines
nmap <C-Up> ddkP
nmap <C-Down> ddp
vmap <c-up> xkp`[v]`
vmap <c-down> xp`[v]`
" easier window navigation
nmap <C-h> <C-w>h
nmap <C-j> <C-w>j
nmap <C-k> <C-w>k
nmap <C-l> <C-w>l
nmap <C-N><C-R> :set relativenumber<cr>
nmap <C-N><C-N> :set invnumber<cr>
" gnome disables the <c-]> search.
nmap <F12> <c-]>
" Capitalize last work
imap GG bgUiwea
" center a block when it is opened
nnoremap zo zozz
" split a buffer vertically
cmap vsb vertical sb
" Colorschemes
colorscheme xoria256
" colorscheme wombat
"
silent! call repeat#set("\<Plug>MyWonderfulMap",v:count)
" Macros
let @i='oecho interpolate($query, $bind_array) ; die;0'
let @l='oecho list_template_variables($template);0'
let @m="oecho'<pre>'; print_r(get_defined_vars()); echo '</pre>';odie;0"
let @v="o$variables = LoadIni::getVariables(GROUPNAME . '/display.ini', '*');0f*s"
let @j=''
let @k=''
let @l=''