" -------------------------------------------------------------------------------- " important " -------------------------------------------------------------------------------- call pathogen#infect() set nocompatible set runtimepath^=~/.vim/bundle/ctrlp.vim " -------------------------------------------------------------------------------- " not sorted " -------------------------------------------------------------------------------- let g:airline#extensions#branch#enabled=1 set t_Co=256 set fileencoding=utf-8 set encoding=utf-8 set title set autoread set matchpairs+=<:> set ruler set showcmd set cursorline let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip" let g:indent_guides_auto_colors = 1 "autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3 "autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4 " -------------------------------------------------------------------------------- " moving around, searching and patterns " -------------------------------------------------------------------------------- set showmatch set incsearch set hlsearch " -------------------------------------------------------------------------------- " tags " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " displaying text " -------------------------------------------------------------------------------- set linebreak " -------------------------------------------------------------------------------- " highlighting and spelling " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " multiple windows " -------------------------------------------------------------------------------- set laststatus=2 " -------------------------------------------------------------------------------- " multiple tab pages " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " terminal " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " using the mouse " -------------------------------------------------------------------------------- set mouse=a " -------------------------------------------------------------------------------- " printing " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " messages and info " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " selecting text " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " editing text " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " tabs and indenting " -------------------------------------------------------------------------------- set tabstop=4 set shiftwidth=4 set expandtab set autoindent filetype plugin indent on " -------------------------------------------------------------------------------- " folding " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " diff mode " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " mapping " -------------------------------------------------------------------------------- inoremap EE $a inoremap ;; $a; inoremap jj :w nnoremap p :set pasteo"*]p:set nopaste" nmap o :NERDTreeToggle nmap s ]sz= nmap r :BLReloadPage nnoremap :vertical resize +5 noremap :vertical resize -5 nnoremap :resize +5 nnoremap :resize -5 nnoremap d :call pdv#DocumentWithSnip() nnoremap t :! vendor/bin/phpunit nnoremap tf :! vendor/bin/phpunit % " -------------------------------------------------------------------------------- " reading and writing files " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " the swap file " -------------------------------------------------------------------------------- set noswapfile " -------------------------------------------------------------------------------- " command line editing " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " executing external commands " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " running make and jumping to errors " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " language specific " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " multi-byte characters " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " variousexecute " -------------------------------------------------------------------------------- " -------------------------------------------------------------------------------- " functions " -------------------------------------------------------------------------------- set rnu function! ToggleNumbersOn() set nu! set rnu endfunction function! ToggleRelativeOn() set rnu! set nu endfunction autocmd FocusLost * call ToggleRelativeOn() autocmd FocusGained * call ToggleRelativeOn() autocmd InsertEnter * call ToggleRelativeOn() autocmd InsertLeave * call ToggleRelativeOn() let g:vimwiki_list = [{ \ 'path': '$HOME/ownCloud/vimwiki/', \ 'template_path': '$HOME/ownCloud/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 :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")