Skip to content

Instantly share code, notes, and snippets.

@damage220

damage220/.vimrc

Created Jun 17, 2016
Embed
What would you like to do?
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" common
Plugin 'scrooloose/nerdtree'
Plugin 'valloric/youcompleteme'
Plugin 'xolox/vim-easytags'
Plugin 'majutsushi/tagbar'
Plugin 'tpope/vim-fugitive'
Plugin 'easymotion/vim-easymotion'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdcommenter'
Plugin 'matze/vim-move'
Plugin 'raimondi/delimitmate'
Plugin 'mattn/emmet-vim'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-surround'
Plugin 'sirver/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'xolox/vim-session'
Plugin 'xolox/vim-misc'
Plugin 'SyntaxAttr.vim'
Plugin 'dyng/ctrlsf.vim'
Plugin 'rking/ag.vim'
Plugin 'godlygeek/tabular'
" php
Plugin 'stanangeloff/php.vim'
Plugin 'sumpygump/php-documentor-vim'
Plugin 'arnaud-lb/vim-php-namespace'
" javascript
Plugin 'pangloss/vim-javascript'
" html
Plugin 'othree/html5.vim'
" twig
Plugin 'evidens/vim-twig'
" css
Plugin 'mtscout6/vim-tagbar-css'
" colors
Plugin 'damage220/solas.vim'
Plugin 'nanotech/jellybeans.vim'
Plugin 'mhartington/oceanic-next'
call vundle#end()
" settings
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoread
set autoindent
set smartindent
set rnu
set laststatus=2
set timeoutlen=500
set ttimeoutlen=0
set keymap=russian-jcukenwin
set iminsert=0
set imsearch=0
set encoding=utf-8
set termencoding=utf-8
set updatetime=500
set noswapfile
set splitright
set splitbelow
set nocompatible
set tags=./tags;
set ignorecase
set hidden
set hlsearch
set incsearch
set cursorline
set pumheight=10
set fillchars+=vert:\
let mapleader=","
filetype off
filetype plugin on
filetype plugin indent on
" autocmd CompleteDone * pclose
" color
syntax enable
set background=dark
colorscheme solas
" abbreviations
abbr help tab help
" mappings
imap df <Esc>l
nnoremap 2o o<CR>
nnoremap 2O O<Esc>O
nnoremap tm :tabm +1<CR>
nnoremap tM :tabm -1<CR>
nnoremap K H
nnoremap J L
nnoremap H gT
nnoremap L gt
nnoremap F :CtrlP<CR>
nnoremap ff :CtrlP<CR>
nnoremap ft :CtrlPBufTag<CR>
nnoremap fb :CtrlPBuffer<CR>
nmap fs <Plug>(easymotion-s)
nmap fl <Plug>(easymotion-sl)
nnoremap fc :NERDTreeFind<CR>
nnoremap fp :CtrlSF
nnoremap <C-h> :noh<CR>
map <C-?> <plug>NERDCommenterComment
map <C-_> <plug>NERDCommenterToggle
nnoremap <C-d> :call PhpDoc()<CR>
nnoremap <C-m> :TagbarToggle<CR>
nnoremap <C-p> :NERDTreeToggle<CR>
nnoremap <C-g> :call SyntaxAttr()<CR>
inoremap <C-j> <C-n>
inoremap <C-k> <C-p>
cnoremap <C-j> <C-n>
cnoremap <C-k> <C-p>
autocmd FileType php noremap <C-u> :call PhpInsertUse()<CR>
nnoremap <F4> :tabe ~/.vimrc<CR>:tabm 0<CR>
nnoremap <F5> :w<CR>:so $MYVIMRC<CR>
" map <alt+n> to navigate through tabs
for c in range(1, 9)
exec "set <A-".c.">=\e".c
exec "map \e".c." <A-".c.">"
let n = c - '0'
exec "map <M-". n ."> ". n ."gt"
endfor
" nerdtree
let NERDTreeAutoDeleteBuffer = 1
" move
let g:move_key_modifier = 'C'
" youcompleteme
let g:ycm_server_python_interpreter='python'
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_key_list_select_completion = ['<Down>']
" emmet
let g:user_emmet_expandabbr_key = '<C-e>'
" airline
let g:airline_theme='solarized'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#tab_min_count = 0
let g:airline#extensions#tabline#formatter = 'unique_tail'
let g:airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline_section_warning = ''
let g:airline_section_error = ''
let g:airline#extensions#tabline#show_close_button = 0
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline#extensions#tagbar#enabled = 0
let g:airline#extensions#tabline#show_tab_nr = 1
let g:airline#extensions#tabline#tab_nr_type = 1
" easymotion
let g:EasyMotion_smartcase = 1
let g:EasyMotion_do_shade = 0
hi link EasyMotionTarget Search
hi EasyMotionTarget2First ctermfg=202 ctermbg=None cterm=None
hi EasyMotionTarget2Second ctermfg=202 ctermbg=None cterm=None
" session
let g:session_autoload = 'yes'
let g:session_autosave = 'yes'
let g:session_autosave_periodic = 5
let g:session_autosave_silent = 1
let g:session_default_to_last = 1
" NERDCommenter
let g:NERDSpaceDelims = 1
" html
au BufNewFile,BufRead *.tpl set filetype=html syntax=php
" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" tagbar
let g:tagbar_sort = 0
let g:tagbar_width = 35
let g:tagbar_iconchars = ['+', '-']
let g:tagbar_map_close = '<C-m>'
let g:tagbar_type_php = {
\'ctagstype': 'php',
\'kinds': [
\'i:interfaces',
\'c:classes',
\'d:constants',
\'f:functions'
\]
\}
let g:tagbar_type_javascript = {
\'ctagstype':'JavaScript',
\'kinds' : [
\'f:functions',
\'c:classes',
\'m:methods',
\'p:properties'
\]
\}
" delimitmate
let delimitMate_expand_cr = 1
let delimitMate_expand_space = 1
au FileType vim,html let b:delimitMate_matchpairs = "(:),[:],{:},<:>,>:<"
" NERDTree
" let g:NERDTreeDirArrowExpandable = '+'
" let g:NERDTreeDirArrowCollapsible = '-'
" ctrlp
let g:ctrlp_by_filename = 1
let g:ctrlp_working_path_mode = 'wr'
let g:ctrlp_map = ''
let g:ctrlp_buftag_types = {
\'php': '--php-kinds=icdf'
\}
" ctrlsf
let g:ctrlsf_position = 'right'
" easytags
let g:easytags_file = './tags'
let g:easytags_auto_highlight = 0
let g:easytags_events = ['BufWritePost']
let g:easytags_async = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.