forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
68 lines (51 loc) · 1.41 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
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
syntax on
colorscheme Tomorrow-Night
set number
set guifont=Menlo:h14
set enc=utf8
" Tabs
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smartindent
set autoindent
"Display current cursor position in lower right corner.
set ruler
"Show command in bottom right portion of the screen
set showcmd
"Always show the status line
set laststatus=2
" case insensitive search
set ignorecase
set smartcase
"Hide MacVim toolbar by default
set go-=T
"Auto close tags (http://www.vim.org/scripts/script.php?script_id=2591)
au FileType xhtml,html,xml so ~/.vim/ftplugin/html_autoclosetag.vim
"Show hidden characters
set list
set listchars=tab:▸\ ,eol:¬
"Invisible character colors
" highlight NonText guifg=#cccccc
" highlight SpecialKey guifg=#cccccc
" Color status bar of current split
hi StatusLine guifg=#CD5907 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
"Exit insert mode with jj
inoremap jj <ESC>
" Source the vimrc file after saving it
if has("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC
endif
" Show syntax highlighting groups for word under cursor
" ctrl+shift+p
nmap <C-S-P> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc