forked from jhkuperus/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
91 lines (64 loc) · 1.93 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
:set encoding=utf-8
let mapleader = " "
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-surround'
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-commentary'
Plug 'jqno/reversal.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'natebosch/vim-lsc'
Plug 'machakann/vim-sandwich'
call plug#end()
" *****************************************
" ** Plugin configuration
" *****************************************
" *** Hexokinase
let g:Hexokinase_ftAutoload = ['css', 'scss', 'html']
let g:Hexokinase_refreshEvents = ['BufWritePost']
" Mappings for vim-commentary
xmap \ <Plug>Commentary
nmap \ <Plug>Commentary
omap \ <Plug>Commentary
nmap \\ <Plug>CommentaryLine
nmap <leader>\ <Plug>Commentary<Plug>Commentary
" *****************************************
" ** Language Server(s) Config
" *****************************************
let g:lsc_server_commands = {
\ 'go' : {
\ 'name': 'gopls',
\ 'command': '/Users/kramor/Development/Projects/Politie/cockroach/bin/gopls',
\ },
\}
" *****************************************
" ** Customized configuration
" *****************************************
syntax on
filetype plugin indent on
set termguicolors
silent! colorscheme reversal
:set number relativenumber
:augroup numbertoggle
: autocmd!
: autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
: autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
:augroup END
:set tabstop=2
:set softtabstop=0
:set expandtab
:set shiftwidth=2
:set smarttab
:set splitright
" Backspace over indents, eols, line-starts: just like normal editors
set backspace=indent,eol,start
" *****************************************
" ** Prevent stray SHIFT keys from blocking
" ** my flow
" *****************************************
:command WQ wq
:command Wq wq
:command W w
:command Q q
" Toggles to reading mode where cursor is kept mid-screen when scrolling
nnoremap <silent> <leader>ts :exec 'set scrolloff=' . (104-&scrolloff)<CR>