-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc_basic
94 lines (81 loc) · 2.39 KB
/
vimrc_basic
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
set nocompatible
filetype off
"""""""""""""""" syntax and indent
" Use colorscheme
colorscheme peachpuff
" Default runtimepath
set rtp+=${DOTFILES}/vim-settings/after
" load filetype-specific indent files
filetype plugin indent on
" Enable syntax
syntax enable
" better visual line breaks
set breakindent
"·width·of·tab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" enable folding
set foldmethod=indent
set foldlevel=99
" Edit previous text and over linebreaks
set backspace=indent,eol,start
"""""""""""""""" Vim Look and Feel
" Highlight search
set hlsearch
" Search as you type
set incsearch
" Press Space to turn off highlighting and clear any message already displayed.
nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
" Always split to the right or below
set splitright
set splitbelow
" Relative numbers
set relativenumber
" line numbers
set number
" syntax highlighting
syntax on
" encoding
set encoding=utf-8
" show the command in bottom line
set showcmd
" list whitespaces and some other characters
set listchars=tab:>-,space:·,eol:✂︎
set list
" Color for special keys
hi SpecialKey ctermfg=gray
hi NonText ctermfg=gray
hi CursorLineNr ctermbg=gray ctermfg=white
" redraw only when we need to.
set lazyredraw
" file format
set fileformat=unix
" Bar hinting for 80 chars
set colorcolumn=81
highlight ColorColumn ctermbg=gray
""""""""""""""""" Search things
" path for subfolders
set path=**
" visual autocomplete for command menu
set wildmenu
set statusline=
set statusline+=%7*\[%n] "buffernr
set statusline+=%1*\ %<%F\ "File+path
set statusline+=%2*\ %y\ "FileType
set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2
set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..)
set statusline+=%8*\ %=\ row:%l/%L\ (%03p%%)\ "Rownumber/total (%)
set statusline+=%9*\ col:%03c\ "Colnr
set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot.
set laststatus=2
" Do case insensitive search
set ignorecase
" Dont ignore if capital letters are used
set smartcase
""""""""""""""" local settings
set exrc " Load vimrc in current directory
set secure " Save vimrc content
"""""""""""""""" Remap keys
hi Search cterm=None ctermfg=red ctermbg=green