2014-04-19 13:25:29 -04:00
|
|
|
if has('conceal')
|
|
|
|
set conceallevel=2 concealcursor=i
|
|
|
|
endif
|
2014-07-30 13:03:23 -04:00
|
|
|
nnoremap <Leader>autoformat! :%s/, /,<CR>:%s/ \/ /\/<CR>:%s/ {/{<CR>:%s/} /}<CR>:%s/ = /=
|
|
|
|
command! WW %!sudo tee > /dev/null %
|
2014-04-19 13:25:29 -04:00
|
|
|
au VimResized * exe "normal! \<c-w>="
|
2014-07-19 05:13:08 -04:00
|
|
|
au BufRead,BufNewFile *.twig set filetype=htmljinja
|
2014-08-05 14:24:42 -04:00
|
|
|
au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
|
|
|
au FileType * :hi IndentGuidesOdd guibg=red ctermbg=239
|
|
|
|
au FileType * :hi IndentGuidesEven guibg=white ctermbg=239
|
|
|
|
au FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
|
|
|
au FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
|
|
|
au FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
|
|
|
au FileType python setlocal omnifunc=pythoncomplete#Complete
|
|
|
|
au FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
2014-05-06 16:51:00 -04:00
|
|
|
"match Error /\s\+$/
|
2014-04-19 13:25:29 -04:00
|
|
|
"nnoremap s xa
|
|
|
|
"nnoremap <F5> :UndotreeToggle<CR>
|
2014-08-05 14:24:42 -04:00
|
|
|
"inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
2014-06-16 09:42:03 -04:00
|
|
|
imap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
|
2014-08-20 22:09:19 -04:00
|
|
|
smap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
2014-07-14 12:57:10 -04:00
|
|
|
nnoremap <C-w>\| <C-w>v<C-w>l
|
|
|
|
nnoremap <C-w>- <C-w>s<C-w>j
|
2014-07-08 00:41:20 -04:00
|
|
|
nnoremap <C-d> <C-w>q
|
2014-05-19 12:30:34 -04:00
|
|
|
nnoremap <F3> :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out<CR>
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap G G$
|
|
|
|
vnoremap G G$
|
2014-07-17 01:50:43 -04:00
|
|
|
nnoremap <F5> :GundoToggle<CR>
|
2015-01-20 07:43:44 -05:00
|
|
|
nnoremap <F6> :argdo normal <CR>
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap <F8> :TagbarToggle<CR>
|
|
|
|
nnoremap + <C-a>
|
|
|
|
nnoremap - <C-x>
|
|
|
|
nnoremap Q <Nop>
|
2014-08-20 22:09:19 -04:00
|
|
|
nnoremap <Leader><Leader> <C-^>
|
|
|
|
nnoremap <Leader>a :!git st<CR>:!ls<CR>:!git a
|
|
|
|
nnoremap <Leader>up :!git pull origin
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap <Leader>st :!git st<CR>
|
|
|
|
nnoremap <Leader>ci :!git st<CR>:!git ci ""<Left>
|
|
|
|
nnoremap <Leader>log :!git hist<CR>
|
|
|
|
nnoremap <Leader>br :!git br<CR>
|
|
|
|
nnoremap gb :ls<CR>:b
|
|
|
|
nnoremap <Leader>d :bd
|
|
|
|
nnoremap <Leader>q :q
|
|
|
|
nnoremap <Leader>W :%s/\s\+$//<CR>:let @/=''<CR>
|
|
|
|
nnoremap <Leader>o m`o<Esc>``
|
|
|
|
nnoremap <Leader>O m`O<Esc>``
|
|
|
|
nnoremap <Leader>go %m`%x``
|
|
|
|
nnoremap <Leader>if m"Oif(){<Esc>jo}<Esc>`"v><Esc>k^wa
|
|
|
|
nnoremap <Leader>else m"kAelse{<Esc>jo}<Esc>`"v><Esc>
|
|
|
|
nnoremap <Leader>for m"Ofor(){<Esc>jo}<Esc>`"v><Esc>k^wa
|
|
|
|
nnoremap <Leader>while m"Owhile(){<Esc>jo}<Esc>`"v><Esc>k^wa
|
|
|
|
nnoremap <Leader>rm m"kddjddkv<<Esc>`"
|
2014-07-29 15:55:40 -04:00
|
|
|
nnoremap <Leader># O#{{{<Esc>jo#}}}<Esc>kk^a
|
2014-08-01 23:14:59 -04:00
|
|
|
vnoremap <Leader># <Esc>`<O#{{{<Esc>`>o#}}}<Esc>`<k^a
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap <Leader>{ O//{{{<Esc>jo//}}}<Esc>kk^la
|
|
|
|
vnoremap <Leader>{ <Esc>`<O//{{{<Esc>`>o//}}}<Esc>`<k^la
|
|
|
|
vnoremap <Leader>if <Esc>`<Oif(){<Esc>`>o}<Esc>gv><Esc>`<k^wa
|
|
|
|
vnoremap <Leader>else <Esc>`<kAelse{<Esc>`>o}<Esc>gv><Esc>
|
|
|
|
vnoremap <Leader>for <Esc>`<Ofor(){<Esc>`>o}<Esc>gv><Esc>`<k^wa
|
|
|
|
vnoremap <Leader>while <Esc>`<Owhile(){<Esc>`>o}<Esc>gv><Esc>`<k^wa
|
|
|
|
vnoremap <Leader>rm <Esc>`<<Esc>kdd`>jddgv<<Esc>
|
2014-06-16 09:42:03 -04:00
|
|
|
vnoremap <silent> * :call VisualSelection('f')<CR>
|
|
|
|
vnoremap <silent> # :call VisualSelection('b')<CR>
|
2014-04-19 13:25:29 -04:00
|
|
|
"nnoremap <Space> zo:set hlsearch! hlsearch?<CR>
|
2014-06-16 09:42:03 -04:00
|
|
|
"nnoremap <Space> :nohlsearch<CR>g<C-g>zo
|
|
|
|
nnoremap <BS> :nohlsearch<CR>g<C-g>zo
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap U <C-r>
|
|
|
|
nnoremap K i<CR><Esc>k$
|
2014-10-26 09:51:57 -04:00
|
|
|
nnoremap <Enter> :up<CR>:silent! call sy#start()<CR>g<C-g>
|
2014-05-19 08:23:55 -04:00
|
|
|
vnoremap gj j
|
|
|
|
vnoremap gk k
|
2014-05-13 17:30:33 -04:00
|
|
|
vnoremap j gj
|
|
|
|
vnoremap k gk
|
|
|
|
vnoremap H ^
|
2014-07-08 00:41:20 -04:00
|
|
|
vnoremap L $h
|
2014-07-23 19:19:52 -04:00
|
|
|
vnoremap ; :
|
2014-05-19 08:23:55 -04:00
|
|
|
nnoremap gj j
|
|
|
|
nnoremap gk k
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap j gj
|
|
|
|
nnoremap k gk
|
|
|
|
nnoremap H ^
|
|
|
|
nnoremap L $
|
|
|
|
nnoremap <C-h> <C-w>h
|
|
|
|
nnoremap <C-j> <C-w>j
|
|
|
|
nnoremap <C-k> <C-w>k
|
|
|
|
nnoremap <C-l> <C-w>l
|
|
|
|
map , <Plug>(easymotion-prefix)
|
2014-08-20 22:09:19 -04:00
|
|
|
nnoremap ! :!
|
2014-04-19 13:25:29 -04:00
|
|
|
nnoremap ; :
|
2014-08-20 22:09:19 -04:00
|
|
|
nnoremap J Jx
|
2014-04-19 13:25:29 -04:00
|
|
|
vnoremap < <gv
|
|
|
|
vnoremap > >gv
|
2014-08-02 00:45:13 -04:00
|
|
|
nnoremap <F1> <nop>
|
2014-04-19 13:25:29 -04:00
|
|
|
inoremap <F1> <nop>
|
|
|
|
vnoremap <F1> <nop>
|
2014-07-29 15:55:40 -04:00
|
|
|
nnoremap <Leader>** yyPv$r*jyypv$r*
|
|
|
|
nnoremap <Leader>= yypv$r=
|
|
|
|
nnoremap <Leader>- yypv$r-
|
|
|
|
nnoremap <Leader>^ yypv$r^
|
|
|
|
nnoremap <Leader>" yypv$r"
|
2014-11-07 21:25:46 -05:00
|
|
|
inoremap '' ''<Left>
|
|
|
|
inoremap "" ""<Left>
|
|
|
|
inoremap () ()<Left>
|
|
|
|
inoremap <> <><Left>
|
2014-06-16 09:42:03 -04:00
|
|
|
inoremap {} <Right>{}<Left><CR><Esc>O
|
2014-11-07 21:25:46 -05:00
|
|
|
inoremap {% {% %}<Left><Left><Left>
|
|
|
|
inoremap [] []<Left>
|
2014-07-21 00:50:13 -04:00
|
|
|
inoremap ;;; <Esc>A
|
2014-07-19 17:30:06 -04:00
|
|
|
inoremap ;; <Esc>m`A;<Esc>``a
|
|
|
|
inoremap ;;<Space> <Esc>A;<Esc>o
|
|
|
|
nnoremap ;; m"A;<Esc>`"
|
|
|
|
nnoremap ;;<Space> A;<Esc>o
|
2014-06-16 09:42:03 -04:00
|
|
|
inoremap <C-l> <Right>
|
|
|
|
inoremap <C-h> <Left>
|
|
|
|
inoremap <C-k> <Up>
|
|
|
|
inoremap <C-j> <Down>
|
|
|
|
nnoremap Y y$
|
2014-07-16 15:57:52 -04:00
|
|
|
nnoremap <Up> <C-w>w
|
|
|
|
nnoremap <Down> <C-w>W
|
|
|
|
nnoremap <Left> :bp<CR>
|
|
|
|
nnoremap <Right> :bn<CR>
|
2014-08-11 01:09:13 -04:00
|
|
|
nnoremap <C-w>z <C-w>_<C-w>\|
|
2015-01-10 23:20:42 -05:00
|
|
|
nnoremap <Leader>bun G?Plug <CR>yyjp$hdi'"+gP0Wl3d/\/<CR>xjyyP$"+gp<Esc>:nohlsearch<CR>:up<CR>:PluginInstall
|
2014-07-21 06:34:23 -04:00
|
|
|
nnoremap <Leader><C-p> :CtrlPFunky<CR>
|
2014-08-02 00:38:28 -04:00
|
|
|
nnoremap <F2> :set invpaste<CR>
|
2014-08-20 22:09:19 -04:00
|
|
|
nnoremap <C-Up> [e
|
|
|
|
nnoremap <C-Down> ]e
|
|
|
|
vnoremap <C-Up> [egv
|
|
|
|
vnoremap <C-Down> ]egv
|
|
|
|
nnoremap / /\v
|
|
|
|
vnoremap / /\v
|
2014-08-23 13:15:49 -04:00
|
|
|
inoremap jk <Esc>A
|
|
|
|
inoremap kj <Esc>A
|
2014-06-21 20:40:54 -04:00
|
|
|
set guicursor+=n-v-c:blinkon0
|
2014-11-07 21:25:46 -05:00
|
|
|
set ttimeout
|
|
|
|
set ttimeoutlen=0
|
|
|
|
set notimeout
|
2014-06-21 20:40:54 -04:00
|
|
|
set formatoptions-=r
|
|
|
|
set formatoptions-=o
|
2014-04-19 13:25:29 -04:00
|
|
|
set diffopt+=iwhite
|
|
|
|
set noesckeys
|
|
|
|
set mouse-=a
|
|
|
|
set shiftwidth=2
|
2014-07-16 15:57:52 -04:00
|
|
|
set tabstop=2
|
2014-09-07 11:06:54 -04:00
|
|
|
set modeline
|
2014-07-16 15:57:52 -04:00
|
|
|
set softtabstop=2
|
|
|
|
set expandtab
|
2014-04-19 13:25:29 -04:00
|
|
|
set history=1000
|
|
|
|
set hidden
|
|
|
|
set cursorline
|
|
|
|
set incsearch
|
|
|
|
set showmatch
|
|
|
|
set hlsearch
|
|
|
|
set scrolloff=3
|
|
|
|
set scrolljump=5
|
|
|
|
set autoindent
|
|
|
|
set backup
|
|
|
|
set backupdir=~/.vim/backup
|
|
|
|
set directory=~/.vim/tmp
|
|
|
|
set undolevels=1000
|
2014-07-29 15:55:40 -04:00
|
|
|
set history=500
|
2014-04-19 13:25:29 -04:00
|
|
|
set ttyfast
|
|
|
|
set ff=unix
|
2014-07-16 15:57:52 -04:00
|
|
|
set encoding=utf-8
|
|
|
|
set laststatus=2
|
2015-03-12 16:54:37 -04:00
|
|
|
set foldmethod=indent
|
2014-07-16 15:57:52 -04:00
|
|
|
set foldnestmax=10
|
|
|
|
set foldlevel=2
|
|
|
|
set rnu
|
|
|
|
set nu
|
|
|
|
set ts=2 sw=2 et
|
|
|
|
set background=dark
|
|
|
|
set t_Co=256
|
|
|
|
set gdefault
|
|
|
|
set nocompatible
|
|
|
|
set rtp+=~/.vim/bundle/vundle/
|
2014-08-22 14:14:45 -04:00
|
|
|
set ignorecase
|
2015-01-20 07:43:44 -05:00
|
|
|
set textwidth=0
|
2014-04-19 13:25:29 -04:00
|
|
|
syntax on
|
2014-07-08 00:41:20 -04:00
|
|
|
let g:airline_left_sep='▶'
|
|
|
|
let g:airline_right_sep='◀'
|
2015-02-20 17:00:42 -05:00
|
|
|
let g:airline#extensions#syntastic#enabled=0
|
2014-07-29 15:55:40 -04:00
|
|
|
let g:airline#extensions#whitespace#enabled=0
|
|
|
|
let g:airline#extensions#whitespace#show_message=0
|
|
|
|
let g:airline#extensions#tmuxline#enabled=1
|
|
|
|
let g:formatprg_cpp="astyle"
|
|
|
|
let g:formatprg_args_expr_cpp=" --mode=c --style=1tbs -xe -k1 -j"
|
2014-06-16 09:42:03 -04:00
|
|
|
" These flags don't work for some reason
|
2014-04-19 13:25:29 -04:00
|
|
|
" -xn -xc -xl -S
|
2014-07-08 00:41:20 -04:00
|
|
|
"let g:airline#extensions#tabline#enabled=1
|
2014-07-29 15:55:40 -04:00
|
|
|
let g:Powerline_symbols='fancy'
|
|
|
|
let g:indent_guides_start_level=1
|
2014-04-19 13:25:29 -04:00
|
|
|
let g:indent_guides_guide_size=1
|
|
|
|
let g:indent_guides_enable_on_vim_startup=1
|
2014-08-02 00:38:28 -04:00
|
|
|
"let g:neocomplcache_enable_at_startup=1
|
|
|
|
"let g:neocomplcache_enable_camel_case_completion=1
|
|
|
|
"let g:neocomplcache_enable_smart_case=1
|
|
|
|
"let g:neocomplcache_enable_underbar_completion=1
|
|
|
|
"let g:neocomplcache_enable_auto_delimiter=1
|
|
|
|
"let g:neocomplcache_max_list=20
|
|
|
|
"let g:neocomplcache_force_overwrite_completefunc=1
|
|
|
|
"let g:neocomplcache_min_syntax_length=2
|
|
|
|
"let g:neocomplcache_enable_auto_select=1
|
|
|
|
let g:neocomplete#enable_at_startup = 1
|
|
|
|
let g:neocomplete#enable_smart_case = 1
|
|
|
|
let g:neocomplete#sources#syntax#min_keyword_length = 2
|
2014-04-19 13:25:29 -04:00
|
|
|
let g:php_refactor_command='php /usr/local/bin/refactor.phar'
|
2014-07-21 05:04:07 -04:00
|
|
|
let g:ctrlp_extensions=['funky']
|
2014-06-16 23:13:57 -04:00
|
|
|
"inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
|
2014-08-05 14:24:42 -04:00
|
|
|
function! g:UltiSnips_Complete()
|
|
|
|
call UltiSnips#ExpandSnippet()
|
|
|
|
if g:ulti_expand_res == 0
|
|
|
|
if pumvisible()
|
|
|
|
return "\<C-n>"
|
|
|
|
else
|
|
|
|
call UltiSnips#JumpForwards()
|
|
|
|
if g:ulti_jump_forwards_res == 0
|
|
|
|
return "\<TAB>"
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
return ""
|
|
|
|
endfunction
|
|
|
|
au BufEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
|
|
|
|
let g:UltiSnipsJumpForwardTrigger="<tab>"
|
|
|
|
let g:UltiSnipsListSnippets="<c-e>"
|
|
|
|
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
2014-07-29 15:55:40 -04:00
|
|
|
let loaded_matchit=1
|
2014-08-02 00:38:28 -04:00
|
|
|
let g:UltiSnipsEditSplit="vertical"
|
2014-07-16 15:57:52 -04:00
|
|
|
filetype off
|
2014-11-16 15:07:53 -05:00
|
|
|
if has("win32")
|
|
|
|
call plug#begin('~/vimfiles/plugged')
|
|
|
|
else
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
endif
|
2014-11-16 12:42:59 -05:00
|
|
|
"Plug 'Floobits/floobits-vim'
|
|
|
|
"Plug 'tsaleh/vim-matchit'
|
|
|
|
"Plug 'Shougo/neosnippet'
|
|
|
|
"Plug 'msanders/snipmate.vim'
|
|
|
|
"Plug 'vim-scripts/YankRing.vim'
|
|
|
|
Plug 'Chiel92/vim-autoformat'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Adds autoformat command | https://github.com/Chiel92/vim-autoformat
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tpope/vim-surround'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Surround selection in ({\"' or HTML tags | https://github.com/tpope/vim-surround
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'scrooloose/syntastic'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Syntax checker | https://github.com/scrooloose/syntastic
|
2014-11-16 12:42:59 -05:00
|
|
|
"Plug 'Shougo/neocomplcache.vim'
|
2014-08-02 00:38:28 -04:00
|
|
|
" "Tab complete everything | https://github.com/Shougo/neocomplcache.vim
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'nathanaelkane/vim-indent-guides'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Indentation guides | https://github.com/nathanaelkane/vim-indent-guides
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'elzr/vim-json'
|
2014-07-31 00:08:14 -04:00
|
|
|
"JSON highlighting | https://github.com/elzr/vim-json
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'groenewege/vim-less'
|
2014-07-31 00:08:14 -04:00
|
|
|
"LESS highlighting | https://github.com/groenewege/vim-less
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'pangloss/vim-javascript'
|
2014-07-31 00:08:14 -04:00
|
|
|
"JS syntax and indentation | https://github.com/pangloss/vim-javascript
|
2015-02-10 10:04:45 -05:00
|
|
|
"Plug 'briancollins/vim-jst'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Actually, I do not know what this does | https://github.com/briancollins/vim-jst
|
2015-02-10 10:04:45 -05:00
|
|
|
"Plug 'kchmck/vim-coffee-script'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Coffeescript syntax | https://github.com/kchmck/vim-coffee-script
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'Lokaltog/powerline-fonts'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Better powerline fonts | https://github.com/Lokaltog/powerline-fonts
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'bling/vim-airline'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Bottom status bar | https://github.com/bling/vim-airline
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'terryma/vim-multiple-cursors'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Multicursor functionality like Coda | https://github.com/terryma/vim-multiple-cursors
|
2014-12-14 17:28:14 -05:00
|
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
2014-07-31 00:08:14 -04:00
|
|
|
"File browser | https://github.com/scrooloose/nerdtree
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'altercation/vim-colors-solarized'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Theme | https://github.com/altercation/vim-colors-solarized
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'stonewareslord/vim-colors'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Theme pack | https://github.com/spf13/vim-colors
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'spf13/PIV'
|
2014-07-31 00:08:14 -04:00
|
|
|
"PHP tools | https://github.com/spf13/PIV
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'vim-scripts/AutoTag'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Generates taglist with ctags | https://github.com/vim-scripts/AutoTag
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'Lokaltog/vim-easymotion'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Move around quickly in a document | https://github.com/Lokaltog/vim-easymotion
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'sjl/gundo.vim'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Visual undo | https://github.com/sjl/gundo.vim
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tommcdo/vim-exchange'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Exchange two selections of text | https://github.com/tommcdo/vim-exchange
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tpope/vim-repeat'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Repeat last tpope command with . | https://github.com/tpope/vim-repeat
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tpope/vim-commentary'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Comment selection | https://github.com/tpope/vim-commentary
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'vim-php/vim-php-refactoring'
|
2014-07-31 00:08:14 -04:00
|
|
|
"PHP refactoring | https://github.com/vim-php/vim-php-refactoring
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tpope/vim-fugitive'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Great Vim-Git compatibility | https://github.com/tpope/vim-fugitive
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tpope/vim-unimpaired'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Bracket shortcuts | https://github.com/tpope/vim-unimpaired
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'kien/ctrlp.vim'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Fuzzy file search | https://github.com/kien/ctrlp.vim
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tacahiroy/ctrlp-funky'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Fuzzy function search | https://github.com/tacahiroy/ctrlp-funky
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'godlygeek/tabular'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Quickly make tables in vim | https://github.com/godlygeek/tabular
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'tpope/vim-abolish'
|
2014-07-31 00:08:14 -04:00
|
|
|
"Better abbrivation | https://github.com/tpope/vim-abolish
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'godlygeek/csapprox'
|
2014-07-31 00:08:14 -04:00
|
|
|
"256 color vim in terminal | https://github.com/godlygeek/csapprox
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'sirver/UltiSnips'
|
2014-08-02 00:38:28 -04:00
|
|
|
"Adds snippets | https://github.com/sirver/UltiSnips
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'honza/vim-snippets'
|
2014-10-20 17:25:46 -04:00
|
|
|
"More snippets | https://github.com/honza/vim-snippets
|
2014-12-15 07:39:42 -05:00
|
|
|
if has("lua")
|
|
|
|
Plug 'Shougo/neocomplete.vim'
|
|
|
|
"Autocompletes | https://github.com/Shougo/neocomplete.vim
|
|
|
|
endif
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'othree/eregex.vim'
|
2014-08-22 14:14:45 -04:00
|
|
|
"Real regexes in vim | https://github.com/othree/eregex.vim
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'vim-scripts/sessionman.vim'
|
2014-10-20 17:25:46 -04:00
|
|
|
"Session manager | https://github.com/vim-scripts/sessionman.vim
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'mattn/flappyvird-vim'
|
2014-10-20 17:25:46 -04:00
|
|
|
"The amazing Flappy Bird game | https://github.com/mattn/flappyvird-vim
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'morhetz/gruvbox'
|
2014-10-20 17:25:46 -04:00
|
|
|
"Colorscheme | https://github.com/morhetz/gruvbox
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'superbrothers/vim-vimperator'
|
2014-10-20 17:25:46 -04:00
|
|
|
"Vimperator for vim | https://github.com/superbrothers/vim-vimperator
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'Rykka/colorv.vim'
|
2014-10-20 17:25:46 -04:00
|
|
|
"Color selection in vim | https://github.com/Rykka/colorv.vim
|
2014-11-16 12:42:59 -05:00
|
|
|
"Plug 'Townk/vim-autoclose'
|
2014-10-26 09:51:57 -04:00
|
|
|
" "Autoclose brackets | https://github.com/Townk/vim-autoclose
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'mhinz/vim-signify'
|
2014-10-20 17:25:46 -04:00
|
|
|
"Git information inline | https://github.com/mhinz/vim-signify
|
2014-11-16 12:42:59 -05:00
|
|
|
Plug 'jamessan/vim-gnupg'
|
2015-01-10 23:20:42 -05:00
|
|
|
"GPG support | https://github.com/jamessan/vim-gnupg
|
2014-12-31 10:24:31 -05:00
|
|
|
Plug 'stonewareslord/zeavim.vim'
|
2015-03-02 07:41:44 -05:00
|
|
|
"Zeal support | https://github.com/stonewareslord/zeavim.vim
|
2015-01-10 23:20:42 -05:00
|
|
|
Plug 'vim-scripts/DirDiff.vim'
|
|
|
|
"Directory diff | https://github.com/vim-scripts/DirDiff.vim
|
2015-03-02 07:41:44 -05:00
|
|
|
Plug 'vim-scripts/DoxygenToolkit.vim'
|
|
|
|
"Doxygen | https://github.com/vim-scripts/DoxygenToolkit.vim
|
2014-08-02 00:38:28 -04:00
|
|
|
"DO NOT DELETE LINE ABOVE OR \bun WILL BREAK
|
2014-11-16 12:42:59 -05:00
|
|
|
call plug#end()
|
2014-04-19 13:25:29 -04:00
|
|
|
filetype plugin indent on
|
|
|
|
if exists("+undofile")
|
2014-07-29 15:55:40 -04:00
|
|
|
if isdirectory($HOME . '/.vim/undo')==0
|
2014-04-19 13:25:29 -04:00
|
|
|
:silent !mkdir -p ~/.vim/undo > /dev/null 2>&1
|
|
|
|
endif
|
|
|
|
set undodir=./.vim-undo//
|
|
|
|
set undodir+=~/.vim/undo//
|
|
|
|
set undofile
|
|
|
|
endif
|
2014-08-22 19:37:05 -04:00
|
|
|
augroup vimrc
|
|
|
|
au!
|
|
|
|
au BufWritePost .vimrc,vimrc source %
|
|
|
|
augroup END
|
2014-04-19 13:25:29 -04:00
|
|
|
augroup vimrcEx
|
|
|
|
au!
|
|
|
|
" When editing a file, always jump to the last known cursor position.
|
|
|
|
autocmd BufReadPost *
|
2014-07-29 15:55:40 -04:00
|
|
|
\ if line("'\"") > 0 && line("'\"") <=line("$") |
|
2014-04-19 13:25:29 -04:00
|
|
|
\ exe "normal g`\"" |
|
|
|
|
\ endif
|
|
|
|
augroup END
|
|
|
|
if has('gui_running')
|
|
|
|
set guioptions-=T
|
|
|
|
else
|
2014-07-29 15:55:40 -04:00
|
|
|
if &term=='xterm' || &term=='screen'
|
2014-04-19 13:25:29 -04:00
|
|
|
set t_Co=256
|
|
|
|
endif
|
2014-07-09 15:57:52 -04:00
|
|
|
"colorscheme torte
|
2014-04-19 13:25:29 -04:00
|
|
|
endif
|
2014-09-15 09:31:32 -04:00
|
|
|
silent! colorscheme fruity
|
2014-05-02 20:06:07 -04:00
|
|
|
nnoremap <Leader>W :%s/\s\+$//<cr>:let @/=''<cr>
|
2014-11-16 12:42:59 -05:00
|
|
|
function! Initialize()
|
2014-11-16 15:07:53 -05:00
|
|
|
if has("win32")
|
|
|
|
if empty(glob("~/_vim/autoload/plug.vim"))
|
|
|
|
cd ~
|
|
|
|
silent !mkdir vimfiles
|
|
|
|
cd vimfiles
|
|
|
|
silent !mkdir autoload
|
|
|
|
silent !mkdir plugin
|
|
|
|
silent !mkdir backup
|
|
|
|
silent !mkdir undo
|
|
|
|
silent !mkdir tmp
|
|
|
|
cd autoload
|
|
|
|
silent !powershell -command "& { iwr https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -OutFile plug.vim }"
|
|
|
|
silent! so ~/_vimrc
|
|
|
|
silent! PlugInstall
|
|
|
|
q
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
if empty(glob("~/.vim/autoload/plug.vim"))
|
|
|
|
silent !mkdir -p ~/.vim/autoload
|
|
|
|
silent !mkdir -p ~/.vim/plugin
|
|
|
|
silent !mkdir -p ~/.vim/backup
|
|
|
|
silent !mkdir -p ~/.vim/undo
|
|
|
|
silent !mkdir -p ~/.vim/tmp
|
|
|
|
silent !curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
silent! so ~/.vimrc
|
|
|
|
silent! PlugInstall
|
|
|
|
q
|
|
|
|
endif
|
2014-11-16 12:42:59 -05:00
|
|
|
endif
|
|
|
|
endfunction
|