-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
136 lines (108 loc) · 3.93 KB
/
vimrc
File metadata and controls
136 lines (108 loc) · 3.93 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
set nocompatible " be iMproved, required
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/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()
" plugin on GitHub repo
Plug 'tpope/vim-fugitive'
Plug 'ervandew/screen'
Plug 'vim-syntastic/syntastic'
Plug 'jeetsukumaran/vim-buffergator'
Plug 'vim-scripts/upAndDown'
Plug 'pangloss/vim-javascript'
" snippets
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'honza/vim-snippets'
Plug 'ervandew/supertab'
Plug 'mileszs/ack.vim'
" markdown
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
" colors
Plug 'jpo/vim-railscasts-theme'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plug 'L9'
" Git plugin not hosted on GitHub
Plug 'git://git.wincent.com/command-t.git'
Plug 'nvim-lua/plenary.nvim'
Plug 'scalameta/nvim-metals'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plug 'ascenator/L9', {'name': 'newL9'}
" All of your Plugs must be added before the following line
call plug#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" see :h for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
let mapleader=','
set nonumber
" snipmate settings
let g:snips_author = "Matthew Wright"
let g:snips_email = "matt@wrighters.net"
let g:snips_github = "https://github.com/wrighter"
" syntastic settings
let g:syntastic_python_checkers = ['flake8', 'pydocstyle']
" ui stuff
colorscheme railscasts
"set guifont=Andale\ Mono\ 8
"set guifont=Andale\ Mono\ 9
"set guifont=M+\ 1mn\ Medium\ 8
set guifont="Inconsolata Medium 10"
"set guifont=Monaco:h10
"set guifont="Anonymous Pro 12"
set omnifunc=syntaxcomplete#Complete
if has("autocmd")
autocmd BufNewFile,BufRead *.py set ai
autocmd BufNewFile,BufRead *.py syntax on
autocmd BufNewFile,BufRead *.py set expandtab softtabstop=4 filetype=python
autocmd BufRead *.py set smartindent cinwords=if,elif,for,while,try,except,finally,def,class
autocmd BufNewFile,BufRead *.c,*.h,*.C,*.H,*.cpp,*.hpp,*.cxx,*.hxx set cindent cinoptions=g1s
autocmd BufNewFile,BufRead *.c,*.h,*.C,*.H,*.cpp,*.hpp,*.cxx,*.hxx set expandtab
autocmd BufNewFile,BufRead *.tpp set ft=cpp
autocmd BufNewFile,BufRead *.abnf set ft=abnf
"autocmd BufNewFile,BufRead *.py set nospell
autocmd BufNewFile,BufRead *.inc set filetype=php
autocmd BufNewFile,BufRead *.R set expandtab softtabstop=2 filetype=r
autocmd BufNewFile,BufRead *.js set expandtab tabstop=2 softtabstop=2 shiftwidth=2
autocmd BufNewFile,BufRead *.html set expandtab tabstop=2 softtabstop=2 shiftwidth=2
autocmd BufNewFile,BufRead *.sh set expandtab softtabstop=2
autocmd BufNewFile,BufRead *.csv set filetype=txt
autocmd BufNewFile,BufRead *.tl set filetype=lisp
" Source the vimrc file after saving it
autocmd bufwritepost .vimrc source $MYVIMRC
endif
augroup filetype
au! BufRead,BufNewFile *.proto setfiletype proto
augroup end
" mappings
map <C-F4> gg=G
map <C-F5> gggqG
" tags stuff
nmap ,c :!(cd %:p:h;ctags -R *)
nmap ,m :'<,'>ScreenSend<CR>
" make tabs obvious
set lcs=tab:>-,trail:-
" screen
"let g:ScreenShellTerminal=''
let g:ScreenImpl='Tmux'
" command T
let g:CommandTPreferredImplementation='lua'
" for javascript
autocmd FileType javascript noremap <buffer> <C-o> :call JsBeautify()<cr>
" for html
autocmd FileType html noremap <buffer> <C-o> :call HtmlBeautify()<cr>
" for css or scss
autocmd FileType css noremap <buffer> <C-o> :call CSSBeautify()<cr>
set noignorecase
set number
set ruler
set relativenumber