aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
blob: 4e66a435689a6ef1b532ca4eb1666863c804374c (plain) (blame)
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
set nocompatible " This fixes the problem where arrow keys do not function properly on some systems.
let mapleader=' ' " Use space for leader key

" General visual look of Vim
set number
set ruler
set noerrorbells
set laststatus=2
set showmode
let &fillchars ..= ',eob: ' " Hide tildes at EOF
set splitbelow splitright
set cursorline " Highlight the active cursor line
set termguicolors

" Clipboard
set clipboard=unnamedplus

" Text searching options
set incsearch
set ignorecase
set smartcase
set showmatch

" Syntax and formatting
syntax on
set encoding=utf-8
set hidden

" Tabs and indenting
set smartindent
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set noshiftround
set scrolloff=3

" Command line completion options
set showcmd
set wildmenu
filetype plugin on
set omnifunc=syntaxcomplete#Complete
set completeopt=menuone,noselect " Don't autoselect the completion

" Setup undo history
if !isdirectory($HOME."/.vim")
    call mkdir($HOME."/.vim", "", 0770)
endif
if !isdirectory($HOME."/.vim/undo-dir")
    call mkdir($HOME."/.vim/undo-dir", "", 0700)
endif
set undodir=~/.vim/undo-dir
set undofile

" Colors
set background=dark
hi Normal guibg=NONE ctermbg=NONE " Set background transparent

" Setup netrw
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 3
let g:netrw_altv = 1
let g:netrw_winsize = 25

" Plugins
call plug#begin()

" Plugins listed below
Plug 'morhetz/gruvbox'
Plug 'lilydjwg/colorizer'

call plug#end()

" Call after plugin is loaded
colorscheme gruvbox