Dotfiles/dotfiles/vimrc_win
2016-11-30 09:35:05 +00:00

184 lines
7.6 KiB
Text

" important
" --------------------------------------------------------------------------------
call pathogen#infect()
set nocompatible
set runtimepath^=%homepath%\vimfiles\bundle\ctrlp.vim
filetype plugin off
set t_Co=256
" --------------------------------------------------------------------------------
" not sorted
" --------------------------------------------------------------------------------
autocmd BufNewFile,BufRead *.phtml set ft=html
set guifont=Consolas:h12:cANSI
colorscheme desert
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
set showmatch
set incsearch
set hlsearch
" --------------------------------------------------------------------------------
" tags
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" displaying text
" --------------------------------------------------------------------------------
set linebreak
set nowrap
set nu
set rnu
" --------------------------------------------------------------------------------
" highlighting and spelling
" --------------------------------------------------------------------------------
set cursorline
syntax on
" --------------------------------------------------------------------------------
" multiple windows
" --------------------------------------------------------------------------------
set laststatus=2
" --------------------------------------------------------------------------------
" multiple tab pages
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" terminal
" --------------------------------------------------------------------------------
set title
" --------------------------------------------------------------------------------
" using the mouse
" --------------------------------------------------------------------------------
"set mouse=a
" --------------------------------------------------------------------------------
" printing
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" messages and info
" --------------------------------------------------------------------------------
set ruler
set showcmd
" --------------------------------------------------------------------------------
" selecting text
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" editing text
" --------------------------------------------------------------------------------
set matchpairs+=<:>
" --------------------------------------------------------------------------------
" tabs and indenting
" --------------------------------------------------------------------------------
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
filetype plugin indent on
" --------------------------------------------------------------------------------
" folding
" --------------------------------------------------------------------------------
set foldmethod=indent
set foldlevel=1
set foldnestmax=2
"set nofen
" --------------------------------------------------------------------------------
" diff mode
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" mapping
" --------------------------------------------------------------------------------
inoremap EE <esc>$a
inoremap ;; <esc>$a;
inoremap jj <esc>:w<cr>
nnoremap <Leader>p :set paste<CR>o<esc>"*]p:set nopaste<cr>"
nnoremap <Leader>b :ls<CR>:b
nmap <silent> <Leader>o :NERDTreeToggle<CR>
nmap <silent> <Leader>s ]sz=
nmap <Leader>r :BLReloadPage<cr>
nnoremap <silent> <Right> :vertical resize +5<cr>
noremap <silent> <Left> :vertical resize -5<cr>
nnoremap <silent> <Up> :resize +5<cr>
nnoremap <silent> <Down> :resize -5<cr>
nnoremap <leader>d :call pdv#DocumentWithSnip()<cr>
nnoremap <leader>t :! vendor/bin/phpunit<cr>
nnoremap <leader>tf :! vendor/bin/phpunit %<cr>
" --------------------------------------------------------------------------------
" reading and writing files
" --------------------------------------------------------------------------------
set autoread
" --------------------------------------------------------------------------------
" the swap file
" --------------------------------------------------------------------------------
set noswapfile
" --------------------------------------------------------------------------------
" command line editing
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" executing external commands
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" running make and jumping to errors
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" language specific
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" multi-byte characters
" --------------------------------------------------------------------------------
set fileencoding=utf-8
set encoding=utf-8
" --------------------------------------------------------------------------------
" variousexecute
" --------------------------------------------------------------------------------
" --------------------------------------------------------------------------------
" plugins
" --------------------------------------------------------------------------------
" git gutter
"let g:gitgutter_git_executable="C:\tools\cmder\vendor\git-for-windows\bin\git.exe"
"
"let g:sparkupExecuteMapping='<C-D>'
"let g:sparkupExecuteMapping = '<c-d>'
" ultisnips
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
let g:UltiSnipsSnippetsDir = "%homepath%\vimfiles\UltiSnips"
let g:snips_author = "AdeAttwood"
let g:snips_email = "attwood16@googlemail.com"
" vimwiki
let g:vimwiki_list = [{
\ 'path': '%homepath%\vimwiki\',
\ 'template_path': '%homepath\vimwiki\templates',
\ 'template_default': 'default',
\ 'template_ext': '.html',
\ 'auto_toc': 1}]
au BufRead,BufNewFile *.wiki set filetype=vimwiki
function! ToggleCalendar()
execute ":Calendar"
if exists("g:calendar_open")
if g:calendar_open == 1
execute "q"
unlet g:calendar_open
else
g:calendar_open = 1
end
else
let g:calendar_open = 1
end
endfunction
autocmd FileType calendar nmap <buffer> <CR> :<C-u>call vimwiki#diary#calendar_action(b:calendar.day().get_day(), b:calendar.day().get_month(), b:calendar.day().get_year(), b:calendar.day().week(), "V")<CR>
" vim-airline
let g:airline#extensions#branch#enabled=1
let g:airline_theme='bubblegum'
" browserlink
let g:bl_pagefiletype = ['html', 'javascript', 'css', 'scss', 'sass', 'php', 'phtml']
" pdv
let g:pdv_template_dir = "C:/Users/ade/vimfiles/bundle/pdv/templates_snip"
" indent-guides
let g:indent_guides_auto_colors = 1
" --------------------------------------------------------------------------------
" functions
" --------------------------------------------------------------------------------