-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
89 lines (83 loc) · 2.77 KB
/
.vimrc
File metadata and controls
89 lines (83 loc) · 2.77 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
" Installing plugins
" With Vim8, there's now a built-in plugin manager, so we don't have to mess
" around with Pathogen, VAM, Vundle, etc, etc, etc....
" Instead, just do the following:
" mkdir -p ~/.vim/pack/bundle/start # ~/vimfiles/pack/bundle/start on WIN
" cd ~/.vim/pack/bundle/start
" git clone https://github.com/tpope/vim-sensible.git
" On Windows, use the path ~/vimfiles/pack instead of ~/.vim/pack
"
" These are the plugins I have installed:
" https://github.com/leafgarland/typescript-vim
" https://github.com/tpope/vim-sensible.git
" https://github.com/nikvdp/ejs-syntax
" https://github.com/posva/vim-vue.git
set expandtab
" Turn on search highlighting by default
set hlsearch
" Show matching brackets when you cursor over them
set showmatch
" Do indenting sensibly - following 4 settings
set autoindent
set shiftwidth=2
set tabstop=2
set smarttab
" Set vimdiff to ignore whitespace
set diffopt+=iwhite
" Set the scrolling so that if you're X lines from the bottom/top off the screen, it will scroll
" That way, you can always see X-1 lines above/below your cursor
set scrolloff=5
" Enable syntax highlighing
syntax on
" Enable filetype
filetype plugin indent on
" Associate clojurescript (.cljs) files with the clojure syntax highlighting
au BufNewFile,BufRead *.cljs set filetype=clojure
" And cross-platform clojure files
au BufNewFile,BufRead *.cljx set filetype=clojure
" Use a nice colorscheme
colorscheme slate
" When using folds, base them on indentation
set foldmethod=indent
" Allow 4 columns to show folds
set foldcolumn=4
" This has something to do with folds - can't remember what
set nofoldenable
" Turn on line numbers
set number
" Turn on column indicator
set ruler
" Map F5 key to toggle search result highlighting
map <F5> :set hls!<bar>set hls?<CR>
" Open at X columns wide
set columns=80
" Open at Y lines tall
set lines=50
" Use a nice font
" But use the right one on the right platform
if has("win32") || has("win64")
set gfn=Consolas:h12:cANSI
else
set gfn=Menlo\ Regular:h13
endif
" I have no idea what this does
set bs=2
" I have no idea what this does
set autochdir
" Allow you to switch buffers without vim warning you to save it first
" I know I didn't save it! I'm not closing it, just looking at another file for 3 freaking seconds!
" Leave me alone!
set hidden
" Turn off the beeping!
set noerrorbells visualbell t_vb=
if has('autocmd')
autocmd GUIEnter * set visualbell t_vb=
" Fix for syntax highlighting randomly disappearing when editing
" Typescript or Vue files
" https://vim.fandom.com/wiki/Fix_syntax_highlighting
autocmd BufEnter * :syntax sync fromstart
" C# - set tabs to 4 spaces
autocmd FileType cs setlocal tabstop=4 shiftwidth=4
endif
" Set settings for vimclojure
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let', '^fact']