-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
82 lines (64 loc) · 2.62 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
"" General
" configuration for vim-plug and plugins
"
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'ctrlpvim/ctrlp.vim'
Plug 'jremmen/vim-ripgrep'
Plug 'vim-scripts/delek.vim'
Plug 'sheerun/vim-polyglot'
call plug#end()
" NOTE: not all deleks are equal! Use an old one like from vimscripts/delek.vim or flazz/vim-colorschemes
" if colors are wrong on MacOS, you might need to manually copy the color
" scheme files into ~/.vim/colors , or use the 'rtp' option on the plugin
colo delek
set background=dark " makes highlighted text read properly with delek scheme
syntax on
set number "relativenumber " Show line numbers
set wrap " wrap text visually
set linebreak " Break lines at word (requires Wrap lines)
set nolist " important so Vim doesn't insert newlines
set textwidth=0 " important so Vim doesn't insert newlines
set showmatch " Highlight matching brace
" syntax highlighting for cinder files
au BufNewFile,BufRead *.cinder set filetype=javascript
" color fix for parentheses highlighting
highlight Matchparen ctermfg=black ctermbg=cyan
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
" remap <esc> to clear highlighted search results
nnoremap <esc> :noh<return><esc>
" needed so that vim still understands escape sequences,
" which fixes a problem introduced by the remap to remove highlighting
nnoremap <esc>^[ <esc>^[
filetype plugin indent on
set autoindent " Auto-indent new lines
set expandtab " Use spaces instead of tabs
set shiftwidth=4 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=4 " Number of spaces per Tab
"" Advanced
set ruler " Show row and column ruler information
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
set splitbelow " open new split windows below instead of above
set splitright " open new splits on the right instead of the left
" make sure Vim can use 256 colors
set t_Co=256
"always show status bar
set laststatus=2
"show full path in status bar
set statusline +=%F
"highlight status bar of active window, make others dark gray
highlight StatusLineNC cterm=bold ctermbg=darkgray ctermfg=lightgray
" make Ctrl-p plugin use ripgrep
if executable('rg')
let g:ctrlp_user_command = 'rg %s --files --hidden --glob ""'
endif