-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
76 lines (54 loc) · 1.55 KB
/
vimrc
File metadata and controls
76 lines (54 loc) · 1.55 KB
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 1. Install vim
" 2. Install vim-plug (iff the install script below doesn't work)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Generic
" Enable line numbers
set number
" Syntax highlighting
syntax enable
" TODO: leader key remap
let mapleader=","
" Set tabs to be 4 spaces and expand to spaces
set ts=4
set expandtab
" Make backspace delete tabs
set softtabstop=4
" Depth of autoindent
set shiftwidth=4
" Auto indent
set autoindent
" Make backspaces more powerful
set backspace=indent,eol,start
" Allow mouse/trackpad scrolling
:set mouse=a
" Allow ruler info
:set ruler
" Pretty print
:set encoding=utf-8
" wildmenu for file navigation
set wildmenu
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim-plug
" Automatic installation
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
filetype plugin indent on
call plug#begin()
" UltiSnips
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
" TODO: want split window?
let g:UltiSnipsEditSplit="vertical"
" Rust
Plug 'rust-lang/rust.vim'
" VimTex
Plug 'lervag/vimtex'
let g:vimtex_view_method = 'skim'
call plug#end()