aboutsummaryrefslogtreecommitdiff
path: root/conf/options.vim
blob: 07774de8bb2e244b9af6406334db09cd4c0c53a6 (plain)
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
" Search options
set incsearch " Search for partial typed match
set ignorecase " Search not case sensitive
set smartcase " Search for pattern if contains uppercase
set hlsearch " Highlight all match search pattern

" Graphics options
syntax on " Show syntax color
set number " Show line number
colorscheme everforest " Set vim theme to everforest
set termguicolors
set background=light
set colorcolumn=80 " Add an indicator for 80 char limit
set textwidth=80 " Set max text width
"autocmd BufNewFile,BufRead * setlocal formatoptions=cropt " Linebreak at 80 char
set relativenumber " Show relative line number
set cursorline " Select the current line
set showmatch " Show matching brackets when hovered
set noshowmode " Disable the -- INSERTION -- default comment
set so=7 " Set 7 lines to the cursor - when moving vertically

" Mouse options
set mouse=a " Allow the mouse to do all the editing

" Indent options
set tabstop=4 " Size of a tab
set shiftwidth=4 " Number of space for each indent
set softtabstop=0 " Useless indent
set noexpandtab " Vim will automatically use tab and not spaces
set smartindent " Do clever indenting
set copyindent " Copy indent style of the file
" Automatic options
set autowrite " Automatically write the file on certain actions
set autoread " Automatically read external changes on the file

" System
if has('unnamedplus') " Allow OS & vim clipboard sync
	set clipboard=unnamedplus
endif
set noundofile " Save undo history
set history=500 " Max line vim remember
set updatetime=500 " Delay before vim write swap file, better for gitgutter

" Autocomplete
set completeopt=menu,menuone,popup,noselect,noinsert	" Show a pop up for 
														" command completion
set wildmenu " Turn on wildmenu
filetype plugin on

" Avoid garbled characters in Chinese language windows OS
let $LANG='en' " Setting lang as en
set langmenu=en " Setting menu lang as en
" This delete all the defined menu
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim

" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
	set wildignore+=.git\*,.hg\*,.svn\*
else
	set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif

" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l

" Don't redraw while executing macros (good performance config)
set lazyredraw

" How many tenths of a second to blink when matching brackets
set mat=2

" Set UTF-8 as standard encoding and en_US as the standard language
set encoding=utf8

" Use Unix as the standard file type
set ffs=unix,dos,mac

" Turn backup off, since most stuff is in SVN, git etc. anyway...
set nobackup
set nowritebackup
set noswapfile

" Timeout 
set timeoutlen=500

"\u21A6 is ⇥
"set listchars=eol:$,tab:⇥¬¬,trail:·,extends:>,precedes:<,space:·
" 0x1F862 is 🡢
" https://vi.stackexchange.com/questions/422/displaying-tabs-as-characters
set list
set listchars=tab:🡢\ ,trail:·,extends:>,precedes:<,space:·
" Set the list char color
" https://vi.stackexchange.com/questions/6136/how-to-dim-characters-from-set-list/6140#6140
" :hi SpecialKey ctermfg=grey guifg=grey50
" https://gist.github.com/morumo/9405368
:hi SpecialKey ctermfg=darkgray guifg=gray70
ArKa projects. All rights to me, and your next child right arm.