-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
116 lines (91 loc) · 1.78 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
111
112
113
114
115
116
set nocompatible
" Test Platform {
function! MySys()
if has("win32")
return "windows"
else
return "linux"
endif
endfunction
" }
if MySys() == "windows"
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
" swap and backup files {
set backup
set backupdir=~/AppData/Local/Temp//
set undodir=~/AppData/Local/Temp//
set dir=~/AppData/Local/Temp//
" }
elseif MySys() == "linux"
" swap and backup files {
set backup
set backupdir=~/tmp//
set undodir=~/tmp//
set dir=~/tmp//
" }
endif
" spellcheck, default to include camelCase checking (assume most files are code) {
set spell
set spelloptions=camel
" }
" different settings for specific file types {
filetype plugin indent on
" }
" for all text files set 'textwidth' to 0, overriding vimrc_exmaple.vim {
autocmd FileType text setlocal textwidth=0 spelloptions=""
" }
" map F1 to Escape (because it's too easy to hit accidentally) {
map <F1> <Esc>
imap <F1> <Esc>
" }
" Folding {
set foldmethod=indent
" }
" Line Numbers {
set nu
"}
" Tab Stop {
set ts=2
" }
" Shiftwidth {
set sw=2
" }
" Copy Indent {
set ci
" }
" Soft wrapping {
set wrap
set linebreak
set nolist
set textwidth=0
set wrapmargin=0
" }
" join lines with only a single space instead of two {
set nojoinspaces
" }
" Font {
set gfn=DejaVu\ Sans\ Mono\ 11,Lucida\ Console:h11
" }
" Case-sensitive search only when pattern has uppercase {
set ic
set scs
" }
" Always show [window] tabs {
set stal=2
" }
" Hide menu and tool bars {
set guioptions-=m
set guioptions-=T
" }
if has("gui_running")
" https://vim.fandom.com/wiki/Maximize_or_set_initial_window_size
set lines=64 columns=192
endif
" default encoding {
set encoding=utf-8
" }
" insert date - with a new line {
nmap <F5> O<C-R>=strftime('%Y%m%d %a')<Esc><Esc>
" }