-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
88 lines (73 loc) · 1.68 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
" .vimrc by Vaduz
" env
set nocompatible
set fileformat=unix
" locale
set encoding=utf-8
set termencoding=utf-8
set fileencoding=japan
set fileencodings=utf8,euc-jp,iso-2022,cp932
" search
set ignorecase
set smartcase
set wrapscan
set hlsearch
set path^=**
" display
set number
set nolist
set ruler
set showmode
set cmdheight=1
set showtabline=1
set background=dark
set novisualbell
set spellsuggest=10
colorscheme default
" plugin
filetype plugin on
" syntax
syntax on
set autoindent
set smartindent
set formatoptions-=r
" backup
set nobackup
set nowritebackup
set noautowrite
" completion
set wildmenu
set wildmode=list:longest
set history=100
" folding
" set foldmethod=syntax
" tabs
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set backspace=2
" bind paste mode toggle
set pastetoggle=<F3>
" Syntax of these languages are fussy over tabs vs spaces
autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" Customisations based on house-style (arbitrary)
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType css setlocal ts=2 sts=2 sw=2 expandtab
" Treat .rss files as XML
autocmd FileType BufNewFile,BufRead *.rss set filetype=xml
autocmd FileType BufNewFile,BufRead *.plb set filetype=sql
autocmd BufRead,BufNewFile *.thrift set filetype=thrift
autocmd Syntax thrift source ~/.vim/plugin/thrift.vim
nnoremap ,n :set number!<CR>
nnoremap ,ai :set autoindent!<CR>
nnoremap ,si :set smartindent!<CR>
nnoremap <C-l> :tabnext<CR>
nnoremap <C-h> :tabprevious<CR>
nnoremap <F4> :set wrap!<CR>
nnoremap <F8> :NERDTreeToggle<CR>
nnoremap <F12> :quit<CR>
nnoremap <C-k> :tabedit
nnoremap <Up> gk
nnoremap <Down> gj