-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_vimrc
89 lines (71 loc) · 1.91 KB
/
dot_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
set shell=/bin/bash
set encoding=utf-8
" always show status
set laststatus=2
" indent
set tabstop=4 " tabs shown as 4 spaces wide
set shiftwidth=4 " indents are 4 spaces
set expandtab " <Tab> inserts spaces
" set autoindent " Copy indentation from previous line.
filetype plugin indent on
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" lines
set relativenumber
set number
set nowrap
" editing settings
set backspace=2
"search options
set hls
set ignorecase " ignore case when searching
set smartcase " ignore case, unless search has an Uppercase letter
set incsearch
" <Ctrl-l> redraws the screen and removes any search highlighting.
nnoremap <silent> <C-l> :nohl<CR>
" Always keep current line vertically centered
augroup VCenterCursor
au!
au BufEnter,WinEnter,WinNew,VimResized *,*.*
\ let &scrolloff=winheight(win_getid())/2
augroup END
" Plug
set nocompatible
call plug#begin()
Plug 'scrooloose/nerdtree'
Plug 'sheerun/vim-polyglot'
Plug 'pineapplegiant/spaceduck', { 'branch': 'main' }
Plug 'itchyny/lightline.vim'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
call plug#end()
" nerdtree
let NERDTreeMinimalUI = 1
let NERDTreeShowHidden=1
" bindings
nnoremap <SPACE> <Nop>
let mapleader=" "
" search file history with ,-e (fzf.vim)
nnoremap <leader>e :History<CR>
" search all files with ,-p (fzf.vim)
nnoremap <leader>p :Files<CR>
" search git commits with ,-c (fzf.vim)
nnoremap <leader>c :Commits<CR>
nnoremap <Leader>n :NERDTreeToggle<Enter>
" set space duck colors
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
silent! colorscheme spaceduck
let g:lightline = {
\ 'colorscheme': 'spaceduck',
\ 'active': {
\ 'right': [['gitbranch']]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ }