forked from foxx3r/amazing-vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
113 lines (88 loc) · 2.42 KB
/
init.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
" Root Author: Filipe Deschamps (@filipedeschamps)
" Root Source: https://github.com/filipedeschamps/dotfiles
"
" Base Author: Gabriel (@foxx3r)
" Base Source: https://github.com/foxx3r/amazing-vimrc
"
" Fork: Dheison (@dheison0)
" Fork Source: https://github.com/dheison0/amazing-vimrc
" LEADER KEY
let mapleader=","
" COMPATIBILITY
" Set 'nocompatible' to avoid unexpected things that your distro might have
set nocompatible
set t_ut=
" BUNDLE
" Automatically download vim-plug if it doesn't exist
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Configure vim-plug
call plug#begin('~/.vim/bundle')
Plug 'vim-scripts/AutoComplPop'
Plug 'Raimondi/delimitMate'
Plug 'sheerun/vim-polyglot'
Plug 'prabirshrestha/async.vim'
Plug 'AhmedAbdulrahman/vim-aylin'
Plug 'itchyny/lightline.vim'
call plug#end()
" Enable syntax highlighting
syntax on
" SEARCH
" Vim will start searching as you type
set incsearch
" Highlight search term. Use :nohl to redraw screen and disable highlight
set hlsearch
" Use case insensitive search, except when using capital letters
set ignorecase
set smartcase
" AUTO IDENTATION
" Enable auto identation with 'spaces' instead of 'tabs'
set smartindent
set expandtab
set softtabstop=4
set shiftwidth=4
" MOVING BETWEEN FILES
" Set 'hidden' if you want to open a new file inside the same buffer without the
" need to save it first (if there's any unsaved changes).
set hidden
" Auto jump to the last position on reopening file
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Enable omnifunc
set omnifunc=syntaxcomplete#Complete
" COLOR SCHEME
set background=dark
colorscheme aylin
if (has("termguicolors"))
set termguicolors
endif
" ENCODING
set encoding=utf-8
" COMMAND LINE
" Enhanced command line completion
set wildmenu
set cursorline
" Complete files like a shell
set wildmode=list:longest
" Speedup
set ttyfast
" Enable line number
set number
" WRAP
" Stop wrapping long lines
"set nowrap
" Automatically reload buffers when file changes
set autoread
" PLUGINS CONFIGURATIONS
" LightLine
let g:lightline = {
\ 'colorscheme': 'aylin',
\ }
" Other configs
set nocursorcolumn
" set nocursorline
set norelativenumber
set lazyredraw
syntax sync minlines=256