Last active
August 1, 2016 13:26
-
-
Save arysom/007d395af10da6b1e7a8 to your computer and use it in GitHub Desktop.
Yet another simple and ultimate vimrc for linux gvim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " System vimrc file for MacVim | |
| " | |
| " Maintainer: Bjorn Winckler <[email protected]> | |
| " Last Change: Sat Aug 29 2009 | |
| set nocompatible | |
| " The default for 'backspace' is very confusing to new users, so change it to a | |
| " more sensible value. Add "set backspace&" to your ~/.vimrc to reset it. | |
| set backspace+=indent,eol,start | |
| " Disable localized menus for now since only some items are translated (e.g. | |
| " the entire MacVim menu is set up in a nib file which currently only is | |
| " translated to English). | |
| set langmenu=none | |
| " set path to path vim was opened | |
| "http://vim.wikia.com/wiki/Project_browsing_using_find | |
| set path=$PWD/** | |
| runtime! debian.vim | |
| if has("syntax") | |
| syntax on | |
| endif | |
| filetype on " Enable filetype detection | |
| filetype indent on " Enable filetype-specific indenting | |
| filetype plugin on " Enable filetype-specific plugins | |
| set nocompatible " not compatible with the old-fashion vi mode | |
| set bs=2 " allow backspacing over everything in insert mode | |
| set history=50 " keep 50 lines of command line history | |
| set ruler " show the cursor position all the time | |
| "set autoread " auto read when file is changed from outside | |
| set nu " show line numbers | |
| set hlsearch " search highlighting | |
| " auto reload vimrc when editing it | |
| " autocmd! bufwritepost .vimrc source ~/.vimrc | |
| set clipboard=unnamed " yank to the system register (*) by default | |
| set showmatch " Cursor shows matching ) and } | |
| set showmode " Show current mode | |
| set wildchar=<TAB> " start wild expansion in the command line using <TAB> | |
| set wildmenu " wild char completion menu | |
| " ignore these files while expanding wild chars | |
| set wildignore=*.o,*.class,*.pyc | |
| set autoindent " auto indentation | |
| set incsearch " incremental search | |
| set dir=~/.vim/tmp " tell vim where to put swap files | |
| set copyindent " copy the previous indentation on autoindenting | |
| set ignorecase " ignore case when searching | |
| set smartcase " ignore case if search pattern is all lowercase,case-sensitive otherwise | |
| set smarttab " insert tabs on the start of a line according to context | |
| " disable sound on errors | |
| " TAB setting{ | |
| set expandtab "replace <TAB> with spaces | |
| set softtabstop=4 | |
| set shiftwidth=4 | |
| set noerrorbells | |
| set novisualbell | |
| set t_vb= | |
| set tm=500 | |
| set guioptions-=m "remove menu bar | |
| set guioptions-=T "remove toolbar | |
| set guioptions-=r "remove right-hand scroll bar | |
| set guioptions-=L "remove left-hand scroll bar | |
| au GUIEnter * simalt ~x "maxminze windowns | |
| "--------------------------------------------------------------------------- | |
| " ENCODING SETTINGS | |
| "--------------------------------------------------------------------------- | |
| set encoding=utf-8 | |
| set termencoding=utf-8 | |
| set fileencoding=utf-8 | |
| set fileencodings=ucs-bom,utf-8,big5,gb2312,latin1 | |
| fun! ViewUTF8() | |
| set encoding=utf-8 | |
| set termencoding=big5 | |
| endfun | |
| fun! UTF8() | |
| set encoding=utf-8 | |
| set termencoding=big5 | |
| set fileencoding=utf-8 | |
| set fileencodings=ucs-bom,big5,utf-8,latin1 | |
| endfun | |
| fun! Big5() | |
| set encoding=big5 | |
| set fileencoding=big5 | |
| endfun | |
| map <F5> <Esc>:EnableFastPHPFolds<Cr> | |
| map <F6> <Esc>:EnablePHPFolds<Cr> | |
| map <F7> <Esc>:DisablePHPFolds<Cr> | |
| let g:DisableAutoPHPFolding = 1 | |
| let g:netrw_altv = 1 | |
| let g:netrw_fastbrowse = 2 | |
| let g:netrw_keepdir = 0 | |
| let g:netrw_liststyle = 0 | |
| let g:netrw_retmap = 1 | |
| let g:netrw_silent = 1 | |
| let g:netrw_special_syntax= 1 | |
| "http://stackoverflow.com/questions/13232262/how-to-disable-tab-completion-for-tags-in-vim | |
| "The default value of complete option is .,w,b,u,t,i, which means to scan: | |
| ". the current buffer | |
| "w buffers in other windows | |
| "b other loaded buffers | |
| "u unloaded buffers | |
| "t tags | |
| "i included files | |
| set cpt-=t | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'VundleVim/Vundle.vim' | |
| Plugin 'MarcWeber/vim-addon-mw-utils' | |
| Plugin 'tomtom/tlib_vim' | |
| Plugin 'garbas/vim-snipmate' | |
| Plugin 'honza/vim-snippets' | |
| Plugin 'loremipsum' | |
| Plugin 'matchit.zip' | |
| Plugin 'surround.vim' | |
| Plugin 'The-NERD-Commenter' | |
| Plugin 'TaskList.vim' | |
| Plugin 'phpfolding.vim' | |
| Plugin 'trailing-whitespace' | |
| Plugin 'mattn/emmet-vim' | |
| Plugin 'adoy/vim-php-refactoring-toolbox' | |
| Plugin 'maksimr/vim-jsbeautify' | |
| Plugin 'junegunn/goyo.vim' | |
| Plugin 'xolox/vim-misc' | |
| Plugin 'xolox/vim-notes' | |
| Plugin 'KabbAmine/yowish.vim' | |
| Plugin 'Syntastic' | |
| Plugin 'editorconfig/editorconfig-vim' | |
| Plugin 'vim-airline/vim-airline' | |
| Plugin 'delimitMate.vim' | |
| Plugin 'VisIncr' | |
| Plugin 'dhruvasagar/vim-table-mode' | |
| Plugin 'captbaritone/better-indent-support-for-php-with-html' | |
| Plugin 'ctrlpvim/ctrlp.vim' | |
| call vundle#end() " required | |
| set guifont=Monaco:h16 | |
| colors yowish | |
| "let g:vim_php_refactoring_use_default_mapping = 0 | |
| "snipmate settings | |
| let g:snipMate = {} | |
| let g:snipMate.scope_aliases = {} | |
| let g:snipMate.scope_aliases['php'] = 'php,codeigniter' | |
| "js beautifier | |
| map <c-f> :call JsBeautify()<cr> | |
| set statusline+=%#warningmsg# | |
| set statusline+=%{SyntasticStatuslineFlag()} | |
| set statusline+=%* | |
| 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 | |
| let g:syntastic_php_checkers = ['php','phpcs'] | |
| let g:syntastic_javascript_checkers = ['eslint'] | |
| " Set up the arrays to ignore for later | |
| if !exists('g:syntastic_html_tidy_ignore_errors') | |
| let g:syntastic_html_tidy_ignore_errors = [] | |
| endif | |
| if !exists('g:syntastic_html_tidy_blocklevel_tags') | |
| let g:syntastic_html_tidy_blocklevel_tags = [] | |
| endif | |
| " Try to use HTML5 Tidy for better checking? | |
| let g:syntastic_html_tidy_exec = '/usr/local/bin/tidy' | |
| " AP: honestly can't remember if this helps or not | |
| " installed with homebrew locally | |
| " Ignore ionic tags in HTML syntax checking | |
| " See http://stackoverflow.com/questions/30366621 | |
| " ignore errors about Ionic tags | |
| let g:syntastic_html_tidy_ignore_errors += [ | |
| \ "<ion-", | |
| \ "discarding unexpected </ion-"] | |
| " Angular's attributes confuse HTML Tidy | |
| let g:syntastic_html_tidy_ignore_errors += [ | |
| \ " proprietary attribute \"ng-"] | |
| " Angular UI-Router attributes confuse HTML Tidy | |
| let g:syntastic_html_tidy_ignore_errors += [ | |
| \ " proprietary attribute \"ui-sref"] | |
| " Angular in particular often makes 'empty' blocks, so ignore | |
| " this error. We might improve how we do this though. | |
| " See also https://github.com/scrooloose/syntastic/wiki/HTML:---tidy | |
| " specifically g:syntastic_html_tidy_empty_tags | |
| let g:syntastic_html_tidy_ignore_errors += ["trimming empty "] | |
| " Angular ignores | |
| let g:syntastic_html_tidy_blocklevel_tags += [ | |
| \ 'ng-include', | |
| \ 'ng-form' | |
| \ ] | |
| " Angular UI-router ignores | |
| let g:syntastic_html_tidy_ignore_errors += [ | |
| \ " proprietary attribute \"ui-sref"] | |
| set laststatus=2 | |
| let g:airline#extensions#tabline#enabled = 0 | |
| let g:airline_theme='yowish' | |
| "quickly move line up or down | |
| nnoremap [e :<c-u>execute 'move -1-'. v:count1<cr> | |
| nnoremap ]e :<c-u>execute 'move +'. v:count1<cr> | |
| " Laravel framework commons | |
| nmap <leader>lr :e app/routes.php<cr> | |
| nmap <leader>lca :e app/config/app.php<cr>81Gf(%O | |
| nmap <leader>lcd :e app/config/database.php<cr> | |
| nmap <leader>lc :e composer.json<cr> | |
| " CtrlP Stuff | |
| " Familiar commands for file/symbol browsing | |
| map <D-p> :CtrlP<cr> | |
| "map <C-r> :CtrlPBufTag<cr> | |
| " I don't want to pull up these folders/files when calling CtrlP | |
| set wildignore+=*/vendor/** | |
| set wildignore+=*/public/forum/** | |
| set wildignore+=*/node_modules/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment