-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
85 lines (69 loc) · 1.92 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
:set fileencodings=utf-8
:set encoding=utf-8
:set modelines=0
:set nocompatible
:set backspace=2
:set ruler tabstop=2 expandtab shiftwidth=2
:set noendofline
:set nofixendofline
" set leader and localleader explicitly
:let mapleader = "\\"
:let maplocalleader = ","
" search settings
:set hlsearch
:set incsearch
" clear hlsearch
:nnoremap <Leader><Enter> :noh<Cr>
" better switching between splits
:map <C-j> <C-w>j
:map <C-k> <C-w>k
:map <C-h> <C-w>h
:map <C-l> <C-w>l
"" open new splits to the right and below
:set splitbelow
:set splitright
" FZF and Silver Searcher configuration"
:nnoremap <Leader>t :FZF<Cr>
:nnoremap <Leader>g :Ag<Cr>
" colorscheme and syntax configuration"
:colorscheme desert
:syntax on
:filetype plugin indent on
:set autoindent
:set smartindent
:set clipboard=unnamed
:set termguicolors
" Don't write backup file if vim is being called by "crontab -e"
:autocmd BufWrite /private/tmp/crontab.* set nowritebackup nobackup
" Don't write backup file if vim is being called by "chpass"
:autocmd BufWrite /private/etc/pw.* set nowritebackup nobackup
:autocmd BufWrite *: Autoformat
" Rust configuration
:let g:rustfmt_autosave = 1
" Zig configuration
:let g:zig_fmt_autosave = 1
:let g:zig_fmt_command = ['zig', 'fmt', '--color', 'off']
" Haskell configuration
:let g:haskell_classic_highlighting = 1
" pgsql configuration
:let g:sql_type_default = 'pgsql'
" Jump to tag
:nnoremap <M-g> :call JumpToDef()<cr>
:inoremap <M-g> <esc>:call JumpToDef()<cr>i
" Lox configuration
:let g:lox_use_jlox = 1
"Vim Plug configuration
:call plug#begin('~/.vim/plugged')
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'lifepillar/pgsql.vim'
Plug 'ziglang/zig.vim'
Plug 'ervandew/supertab'
Plug 'neovimhaskell/haskell-vim'
Plug 'idris-hackers/idris-vim'
Plug 'junegunn/vader.vim'
Plug 'timmyjose-projects/lox.vim'
Plug 'rust-lang/rust.vim'
Plug 'vmchale/ats-vim'
:call plug#end()