-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
105 lines (88 loc) · 3.32 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
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
set nocompatible " be iMproved, required
filetype plugin on
call plug#begin('~/.vim/plugged')
" The Basics
Plug 'suan/vim-instant-markdown', {'for': 'markdown'} " Markdown Preview
Plug 'frazrepo/vim-rainbow'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'itchyny/lightline.vim' " Lightline statusbar
" File management
Plug 'preservim/nerdtree' " Nerdtree
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree
Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
" Productivity
Plug 'vimwiki/vimwiki' " VimWiki
Plug 'jreybert/vimagit' " Magit-like plugin for vim
" Tim Pope Plugins
Plug 'tpope/vim-surround' " Change surrounding marks
" Syntax Highlighting and Colors
Plug 'PotatoesMaster/i3-vim-syntax' " i3 config highlighting
Plug 'kovetskiy/sxhkd-vim' " sxhkd highlighting
Plug 'ap/vim-css-color' " Color previews for CSS
" Intellisense
Plug 'zxqfl/tabnine-vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
" General Settings
set path+=** " Searches current directory recursively.
set wildmenu " Display all matches when tab complete.
set incsearch " Incremental search
set hidden " Needed to keep multiple buffers open
set nobackup " No auto backups
set noswapfile " No swap
set autochdir
set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab
set renderoptions=type:directx
set clipboard=unnamedplus " Copy/paste between vim and other programs.
set number relativenumber
" Color Settings
packadd! omni
colorscheme omni
syntax enable
set bg=dark cursorline termguicolors
" Theme lightline
let g:lightline = {
\ 'colorscheme': 'omni',
\ }
" Always show statusline
set laststatus=2
" NERDTree
" Uncomment to autostart the NERDTree
" autocmd vimenter * NERDTree
map <C-n> :NERDTreeToggle<CR>
let g:NERDTreeDirArrowExpandable = '►'
let g:NERDTreeDirArrowCollapsible = '▼'
let NERDTreeShowLineNumbers=1
let NERDTreeShowHidden=1
let NERDTreeMinimalUI = 1
let g:NERDTreeWinSize=38
" VimWiki
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext': '.md'}]
" Vim-Instant-Markdown
let g:instant_markdown_autostart = 0 " Turns off auto preview
let g:instant_markdown_browser = "brave" " Uses surf for preview
" Remap splits navigation to just CTRL + hjkl
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Key-bindings
xnoremap K :move '<-2<CR>gv-gv
xnoremap J :move '>+2<CR>gv-gv
map q :quit<CR>
map <C-v> :vsplit<CR>
nnoremap <Up> :resize +2<CR>
nnoremap <Down> :resize -2<CR>
nnoremap <Left> :vertical resize +2<CR>
nnoremap <Right> :vertical resize -2<CR>
nmap <C-p> :Files<CR>
" Open NERDTree when no file is to be opened at sratup
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q
\| endif