silas / config

Profile management

This URL has Read+Write access

config / .vimrc
100644 76 lines (56 sloc) 1.185 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
""Enable AI
set ai
 
""Disable VI's compatible mode
set nocompatible
 
""Enable syntax hightlighting
syntax enable
 
""Always show current position
set ruler
 
""Set backspace
set backspace=eol,start,indent
 
""Auto indent
set autoindent
 
""Set to auto read when a file is changed from the outside
set autoread
 
""Show line numbers
set nu
 
""Set line numbers to green
highlight LineNr term=NONE cterm=NONE ctermfg=DarkGreen ctermbg=NONE
 
""Smart search
set incsearch
set smartcase
 
""No sound on errors
set noerrorbells
set novisualbell
set t_vb=
 
""Show matching bracets
set showmatch
 
""Set color scheme
colorscheme desert
 
""Turn backup off
"set nobackup
"set nowb
"set noswapfile
 
""Tabs
set expandtab
set tabstop=2
set shiftwidth=2
 
""File specific tabs
au FileType html,make setl noexpandtab
 
""Spell check
function! ToggleSpell()
  if !exists("b:spell")
    setlocal spell spelllang=en_us
    let b:spell = 1
  else
    setlocal nospell
    unlet b:spell
  endif
endfunction
 
nmap <F4> :call ToggleSpell()<CR>
imap <F4> <Esc>:call ToggleSpell()<CR>
 
""Alt+j and Alt+k to move between tabs
nnoremap <A-j> gT
nnoremap <A-k> gt
 
""Ctrl+Space for autocomplete
imap <c-space> <c-x><c-o>