-
Notifications
You must be signed in to change notification settings - Fork 0
/
simplevimrc
98 lines (73 loc) · 2.3 KB
/
simplevimrc
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
""""""
" UI "
""""""
" disable vi compatibility
set nocompatible
" automatically load changed files
set autoread
" auto-reload vimrc
autocmd! bufwritepost vimrc source ~/.vim/vimrc
"autocmd! bufwritepost gvimrc source ~/.vim/gvimrc
" show the filename in the window titlebar
set title
" set encoding
set encoding=utf-8
" directories for swp files
set backupdir=~/.vim/backup
set directory=~/.vim/backupf
" display incomplete commands at the bottom
set showcmd
" mouse support
set mouse=a
" line numbers
set number
" highlight cursor line
set cursorline
" wrapping stuff
set colorcolumn=80
" Status bar
set laststatus=2
" enable completion
set ofu=syntaxcomplete#Complete
" make laggy connections work faster
set ttyfast
" case-insensitive filename completion
set wildignorecase
"""""""""""""
" Searching "
"""""""""""""
set hlsearch "when there is a previous search pattern, highlight all its matches
set incsearch "while typing a search command, show immediately where the so far typed pattern matches
set ignorecase "ignore case in search patterns
set smartcase "override the 'ignorecase' option if the search pattern contains uppercase characters
set gdefault "imply global for new searches
"""""""""""""
" Indenting "
"""""""""""""
" When auto-indenting, use the indenting format of the previous line
set copyindent
" When on, a <Tab> in front of a line inserts blanks according to 'shiftwidth'.
" 'tabstop' is used in other places. A <BS> will delete a 'shiftwidth' worth of
" space at the start of the line.
set smarttab
" Copy indent from current line when starting a new line (typing <CR> in Insert
" mode or when using the "o" or "O" command)
set autoindent
" Automatically inserts one extra level of indentation in some cases, and works
" for C-like files
set smartindent
"""""""""
" Theme "
"""""""""
syntax enable
"set background=dark "uncomment this if your terminal has a dark background
"""""""""""""""""""""
" Language-Specific "
"""""""""""""""""""""
" load the plugin and indent settings for the detected filetype
filetype plugin indent on
" Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
au BufRead,BufNewFile *.html.erb set ft=eruby
" Add json syntax highlighting
au BufNewFile,BufRead *.json set ft=json syntax=javascript