-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
54 lines (46 loc) · 1.43 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
set shell=bash\ -i
syntax on
set number
set tabstop=4
set expandtab
set shiftwidth=2
set softtabstop=2
" make sure gvim uses a nice 'theme'
if has('gui_running')
set background=dark
colorscheme solarized
set guifont=Consolas\ 10
endif
" change cursor shape based on mode
if &term =~ "^rxvt" || &term=~ "^xterm"
" blinking underscore
let &t_SI .= "\<Esc>[3 q"
" blinking block
let &t_EI .= "\<Esc>[1 q"
" reset to blinking underscore on exit
autocmd VimLeave * silent !echo -ne "\033[3 q"
" 1 or 0 -> blinking block
" 2 -> solid block
" 3 -> blinking underscore
" 4 -> solid underscore
endif
" make xclipboard more easily accessible
set clipboard=unnamedplus
" collate .swp files - don't keep them in the working directory
set directory=~/.vim/tmp,/tmp,.
set backupdir=~/.vim/tmp,/tmp,.
" use gggqG for autoformat of c-like code
" requires astyle
autocmd FileType h,c,cpp,java,ino,pde set formatprg=astyle
" use gggqG for autoformat of xml
" requires xmllint
autocmd FileType xml set formatprg=xmllint\ --encode\ UTF-8\ --format\ %
" force *.md files to be opened as markdown filetypes
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
" vim-instant-markdown previewer
" from https://github.com/suan/vim-instant-markdown
" requires ruby rubygems nodejs xdg-utils
" gems: pygments.rb redcarpet
" also, from npm (nodejs) - instant-markdown-d
let g:instant_markdown_slow = 0
filetype plugin on