-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
72 lines (56 loc) · 2 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
set encoding=utf-8
set updatetime=300
filetype plugin on
set background=dark " Show the dark version of the colors.
" colors ego
colors elflord
set mouse=a " Mouse support in Terminal.app
syntax on
set smartcase
set incsearch " Highlight the words for which you just searched.
set spell spelllang=en_us
set nospell
set nofoldenable " I never remember the fold keys
" show whitespaces
set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,precedes:«,extends:»
" Use sane tab settings.
filetype indent on
set noexpandtab " Tabs exist to let people change the width. Spaces force a style.
set tabstop=4 " 4 is a language-agnostic standard.
set shiftwidth=4 " If expandtab is turned on, 4 is a language-agnostic standard.
set autoindent " Remember `:paste` `:nopaste` toggles indenting off or on respectively for Ctrl+V in insert mode.
" I don't like a copy of my files lying around.
set noswapfile
set nobackup
set nowritebackup
set directory=/dev/null
set backupdir=/dev/null
" keep text from shifting left and right depnding on if a warning is there
set signcolumn=yes
" filename encoding filetype [dec, hex] location% line/maxlines,col
set statusline=%F%m%r%h%w
set statusline+=%#warningmsg#
set statusline+=%*
set statusline+=\ %{&ff}\ %Y\ %=[\%03.3b,\ 0x\%02.2B]\ %p%%\ %l/%L,%v
set laststatus=2
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Easier tab switching in insert mode.
map <C-j> :tabprev<CR>
map <C-k> :tabnext<CR>
imap <C-j> <ESC>:tabprev<CR>
imap <C-k> <ESC>:tabnext<CR>
" Tell netrw to show tree view by default, P.S. press `i` to loop through other views.
let g:netrw_liststyle=3
"let g:netrw_browse_split=2
" netrw by default leaves unmodified buffers open preventing :q
autocmd FileType netrw setl bufhidden=delete
if executable('rls')
au User lsp_setup call lsp#register_server({
\ 'name': 'rls',
\ 'cmd': {server_info->['rustup', 'run', 'nightly', 'rls']},
\ 'whitelist': ['rust'],
\ })
endif