My favorites
|
Sign in
myvim
Common Vim settings for developers and hackers
Project Home
Downloads
Wiki
Issues
Source
Checkout
|
Browse
|
Changes
|
r7
Source path:
svn
/
trunk
/
vimrc-maemo
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
"-------------------------
" VIM settings for N810
" Last update: 18.09.2009
" Author: Pento
"-------------------------
"-------------------------
" Common settings
"-------------------------
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" New leader key
let mapleader = ","
" Enable loading filetype and indentation plugins
filetype plugin on
filetype indent on
" Allow backspacing over everything in insert mode
set backspace=indent,eol,start
" Keep 50 lines of command line history
set history=50
" Show the cursor position all the time
set ruler
" Display incomplete commands
set showcmd
" Turn on number vertical line
set number
" I don't like backups
set nobackup
" Autoclose folds, when moving out of them
"set foldclose=all
" Open all folds
set foldenable
" I like {{{ }}} folds
"set foldmethod=marker
set foldmethod=indent
" Use incremental searching
set incsearch
" Do not highlight search results
set nohlsearch
" Jump 3 lines when running out of the screen
set scrolljump=3
set scrolloff=3
" Write all tmp files to /tmp
set dir=/tmp
" Turn off any bells
set novisualbell
set t_vb=
" Default encoding
set termencoding=utf-8
set fileencodings=utf-8,cp1251,cp866,koi8-r
" Do NOT unload buffer when switch to another one
" this allows to edit several files in the same time without having to save
" them each time you switch between them
set hidden
" Turn on autoindent
set autoindent
" Auto indent after a {
set smartindent
" Switch on syntax highlighting if it wasn't on yet.
syntax on
" Allow to use backspace instead of "x"
set backspace=indent,eol,start whichwrap+=<,>,[,]
" Expand tab to spaces ?
set expandtab
" Default tab size
set shiftwidth=4
set softtabstop=4
set tabstop=4
" Status line format
set statusline=%<%f%h%m%r\ %b\ %{&encoding}\ 0x\ \ %l,%c%V\ %P
" Fix <Enter> for comment
set fo+=cr
" Session options
set sessionoptions=curdir,buffers,tabpages
set foldcolumn=1
"-------------------------
" Russian support
"-------------------------
"set keymap=russian-jcukenwin
"set iminsert=0
"-------------------------
" Bindings
"-------------------------
" Tab autocompletion
function InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
set complete=""
set complete+=.
set complete+=k
set complete+=b
set completeopt-=preview
set completeopt+=longest
" Make shift-insert work like in Xterm
imap <S-Insert> <MiddleMouse>
" use CTRL-F for super tab
imap <C-F> <c-r>=InsertTabWrapper()<cr>
" Search & replace the word under the cursor
nmap ; :%s/\<<c-r>=expand("<cword>")<cr>\>/
" Quick save
inoremap <C-w> <esc>:update<CR>
noremap <C-w> :update<CR>
noremap <C-q> <esc>:q<CR>
inoremap <C-a> <esc>
" < & > to indent blocks
vmap < <gv
vmap > >gv
" Switch off fucked 'Replace mode'
imap <Ins> <Esc>wq
" Add new line in normal mode
map <S-Enter> O<Esc>
map <CR> o<Esc>
"-------------------------
" Colors
"-------------------------
colorscheme darkblue
"-------------------------
" Advanced Settings
"-------------------------
set mps-=[:]
" Encoding menu
set wildmenu
set wcm=<Tab>
menu Encoding.&koi8-r :e ++enc=koi8-r<CR>
menu Encoding.&windows-1251 :e ++enc=cp1251<CR>
menu Encoding.&cp866 :e ++enc=cp866<CR>
menu Encoding.&utf-8 :e ++enc=utf8 <CR>
"-------------------------
" Plugins Settings
"-------------------------
let g:snippetsEmu_key = "<C-l>"
Show details
Hide details
Change log
r7
by naplanetu on Sep 19, 2009
Diff
First commit
Go to:
/trunk/vimrc-maemo
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 3557 bytes, 182 lines
View raw file
Hosted by