Skip to content

Instantly share code, notes, and snippets.

@erkurn
Created May 23, 2017 11:56
Show Gist options
  • Select an option

  • Save erkurn/a7701a49f1f869b87ef37a28b37e197a to your computer and use it in GitHub Desktop.

Select an option

Save erkurn/a7701a49f1f869b87ef37a28b37e197a to your computer and use it in GitHub Desktop.

Revisions

  1. erkurn created this gist May 23, 2017.
    72 changes: 72 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,72 @@
    set number

    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()

    Plugin 'VundleVim/Vundle.vim'
    Plugin 'scrooloose/nerdtree'
    Plugin 'vim-airline/vim-airline'
    Plugin 'vim-airline/vim-airline-themes'
    Plugin 'ctrlpvim/ctrlp.vim'
    Plugin '2072/PHP-Indenting-for-VIm'
    Plugin 'php-vim/phpcd.vim', { 'for': 'php' , 'do': 'composer update' }
    Plugin 'dracula/vim'
    Plugin 'tpope/vim-surround'
    Plugin 'sirver/ultisnips'

    call vundle#end()

    let g:airline#extentions#tabline#enabled = 1

    syntax on
    color dracula
    set encoding=utf-8
    set ruler
    set laststatus=2
    set guioptions-=T
    set clipboard=unnamed
    set guioptions-=r
    set go-=L
    set linespace=15

    set showmode
    set nowrap
    set incsearch
    set tabstop=4
    set smarttab
    set tags=tags
    set softtabstop=4
    set expandtab
    set shiftwidth=4
    set shiftround
    set backspace=indent,eol,start
    set autoindent
    set copyindent
    set ignorecase
    set smartcase
    set timeout timeoutlen=200 ttimeoutlen=100
    set visualbell
    set noerrorbells
    set autowrite
    set mouse=a


    nmap <C-b> :NERDTreeToggle<cr>
    function! Class()
    let name = input('Class name?')
    let namespace = input('Any Namespace ? ')

    if strlen(namespace)
    exec "normal i<?php namespace " . namespace . ";\<C-m>\<C-m>"
    else
    exec "normal i<?php \<C-m>"
    endif

    exec "normal iclass " . name . " {\<C-m>}\<C-[>O\<C-[>"

    exec "normal i\<C-M> public function __construct()\<C-M>{\<C-M>\<C-M>}\<C-[>"

    endfunction
    nmap ,1 :call Class()<cr>