-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
80 lines (58 loc) · 1.31 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
" Use Vim settings rather than Vi
set nocompatible
filetype off
" Make backspace behave in a sane manner
set backspace=indent,eol,start
" Set default encoding to utf
set encoding=utf-8
" Set colors to 256
set t_Co=256
if (has("termguicolors"))
set termguicolors
endif
" Set colorscheme
" set background=dark
" colorscheme night-owl
" Switch syntax highlighting on
syntax on
" Enable file type detection and do language-dependent indenting
filetype plugin indent on
" Show line numbers
set number
"set relativenumber
" Set title and allow hidden buffers
set title
set hidden
" Always wrap long lines:
set wrap
" Some indenting stuff
set autoindent
set tabstop=2
set shiftwidth=2
set expandtab
" Visually highlight 80 character column
" set colorcolumn=80
set laststatus=2
set wildmenu
" Highlight current line
" set cursorline
" Highlight matching [{()}]
set showmatch
" Move vertically by visual line
nnoremap j gj
nnoremap k gk
" Set leader key as Space
let mapleader = "\<Space>"
" Auto remove all trailing whitespace on :w
autocmd BufWritePre * :%s/\s\+$//e
" Backup and Swap
set nobackup
set nowritebackup
set noswapfile
" Improves redrawing
set ttyfast
" No delay when switching between modes
set timeoutlen=0
" Open new split panes to right and bottom, which feels more natural
set splitbelow
set splitright