This repository was archived by the owner on Aug 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.vim
92 lines (73 loc) · 2.81 KB
/
vimrc.vim
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
" Set my colorscheme
" Add folder of vimrc.vim script to runtimepath, so vim will find colors etc.
execute 'set runtimepath+=' . expand('<sfile>:p:h')
colorscheme bionik2
"
set nocompatible
" Alternatives for the escape key
imap jk <Esc>
" Paste in insert mode (alternative: use middle mouse button...)
" imap <C-p> <Space><Esc>"+Pa
" Make backspace work as expected (deletes everything)
set backspace=indent,eol,start
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap <C-U> <C-G>u<C-U>
" Uncomment when used with a dark background
" set background=dark
set showcmd " Show (partial) command in status line.
"set ruler " Show the cursor position all the time
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set ttymouse=xterm2 " Compatibility with tmux
set mouse=a " Enable mouse support (all modes)
set scrolloff=4 " Show a few lines of context around the cursor
syntax on " Syntax highlighting
set autoindent " see :h
set smartindent " see :h
set expandtab " Insert space characters instead of tab
set tabstop=4 " Number of Spaces for every tab inserted
set softtabstop=4 " Delete the whole tab (of 4 spaces)
set shiftwidth=4 " Number of spaces inserted for indentation
set laststatus=2
set statusline=
set statusline+=%#StatusLine#
set statusline+=\ %f "tail of the filename
set statusline+=\ ▒
set statusline+=%#LineNr#
set statusline+=\ [%{strlen(&fenc)?&fenc:'none'}, "file encoding
set statusline+=%{&ff}] "file format
set statusline+=%h "help file flag
set statusline+=%m "modified flag
set statusline+=%r "read only flag
set statusline+=%y "filetype
set statusline+=%= "left/right separator
set statusline+=%c, "cursor column
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
" Shows the line number on the cursor row and relative numbers on the other
" rows
set number " Enable the line numbers
set relativenumber " Enable relative line numbers
set cursorline " Highlight cursor line
set showbreak=@
" mark the 80th column
set colorcolumn=80
set foldcolumn=1 " Set number of columns used for showing folding
set foldmethod=indent " Enable automatic folding with indents
set incsearch " enable incremental seraching
set hlsearch " enables highlighting of the last pattern search
" remove highlighting from search
nnoremap dx :noh<CR>
" Return to the same line you left off at
augroup line_return
au!
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ execute 'normal! g`"zvzz' |
\ endif
augroup END
" greater default size when in gvim
if has('gui_running')
set lines=40 columns=95
endif