Created
February 7, 2018 22:53
-
-
Save Nimoi/ec97ecffb020b0aac759ab0777d2a21b to your computer and use it in GitHub Desktop.
Bad at program
This file contains 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
"Stolen from Alatz https://github.com/alatz | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set number | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
" | |
"Plugin 'tpope/vim-fugitive' | |
" plugin from http://vim-scripts.org/vim/scripts.html | |
"Plugin 'L9' | |
" Git plugin not hosted on GitHub | |
" | |
"Plugin 'git://git.wincent.com/command-t.git' | |
" git repos on your local machine (i.e. when working on your own plugin) | |
"Plugin 'file:///home/gmarik/path/to/plugin' | |
" The sparkup vim script is in a subdirectory of this repo called vim. | |
" Pass the path to set the runtimepath properly. | |
" | |
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
" Avoid a name conflict with L9 | |
"Plugin 'user/L9', {'name': 'newL9'} | |
" | |
Plugin 'scrooloose/nerdtree.git' | |
Plugin 'https://github.com/kien/ctrlp.vim' | |
Plugin 'scrooloose/nerdcommenter.git' | |
Plugin 'scrooloose/syntastic.git' | |
Plugin 'https://github.com/ahw/vim-pbcopy.git' | |
Plugin 'jpalardy/vim-slime' | |
"Plugin 'tpope/vim-surround' | |
"Plugin 'easymotion/vim-easymotion' | |
"Plugin 'bling/vim-airline' | |
"Plugin 'joonty/vdebug' | |
"Plugin 'Lokaltog/vim-powerline.git' | |
"Plugin 'https://github.com/FelikZ/ctrlp-py-matcher' | |
"Plugin 'https://github.com/tacahiroy/ctrlp-funky' | |
Plugin 'junegunn/rainbow_parentheses.vim' | |
Plugin 'valloric/youcompleteme' | |
Plugin 'Raimondi/delimitMate' | |
Plugin 'terryma/vim-expand-region' | |
Plugin 'wellle/visual-split.vim' | |
"Tacky flashy stuff which adds no value | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
:let g:airline_theme='base16_eighties' | |
"More theme options: | |
"atomic | |
"ayu_mirage | |
"base16_bright | |
"base16_eighties | |
"base16_grayscale | |
"behelit | |
"cool | |
"serene | |
"MAKE SOMETHING BETTER | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
"------------------------------------------- | |
"------------- END VUNDLE ------------------ | |
"------------------------------------------- | |
"PEAR formatting | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=4 | |
set tabstop=4 | |
"set ctrlp to search relative to first file opened | |
:let g:ctrlp_working_path_mode = 0 | |
"let g:ctrlp_extensions = ['funky'] | |
":let g:ctrlp_custom_ignore = '\.git$\|\.svn$' | |
"@cd %:h' | |
"cd for current window only | |
":lcd %:p:h | |
"cd for all windows | |
":cd %:p:h | |
"CD in NERDtree to change to current directory | |
"probably not necessary | |
set t_Co=256 | |
"no error bells | |
set noeb vb t_vb= | |
au GUIEnter * set vb t_vb= | |
"easy vsplit resize | |
:nmap <C-v> :vertical resize +20<cr> | |
:nmap <C-c> :resize +10<cr> | |
:nmap 25 :vertical resize 40<cr> | |
:nmap 50 <c-w>= | |
:nmap 75 :vertical resize 120<cr> | |
:nmap 99 <c-w>\| | |
"easy window navigation | |
:nmap <C-h> <C-w>h | |
:nmap <C-j> <C-w>j | |
:nmap <C-k> <C-w>k | |
:nmap <C-l> <C-w>l | |
"easy window move | |
:nmap ˙ <C-w>H | |
:nmap ∆ <C-w>J | |
:nmap ˚ <C-w>K | |
:nmap ¬ <C-w>L | |
"set leader key | |
:let mapleader = "," | |
"fast grepping | |
"command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw! | |
command! -nargs=+ Grep execute 'silent grep! -I -r -n --exclude=*.svn-base --exclude=*.svn --exclude=tags --exclude=.svn . -e "<args>"' | copen | execute 'silent /<args>' | redraw! | |
"command! -nargs=+ Grep execute 'silent grep! -I -r -n --exclude *.svn . -e "<args>"' | copen | execute 'silent /<args>' | redraw! | |
nnoremap \ :Grep<space> | |
"previous char in line | |
:noremap <leader>; , | |
"for the current file use % e.g. :nmap <leader>r :w!<cr> :!php -f %<cr> | |
"this will save and run the current file in php interactive shell with 'leader r' | |
:nmap <leader>r :w!<cr> :!clear; php -f %<cr> | |
"fast quit | |
:nmap <leader>q :q<cr> | |
:nmap <leader>z :q!<cr> | |
"map save to leader w | |
:nmap <Leader>w :w!<cr> | |
"case insensitive search, unless told otherwise | |
:set ignorecase | |
:set smartcase | |
:set incsearch | |
:set hlsearch | |
"toggle NERDtree | |
:noremap <Leader>m :NERDTreeToggle<cr> | |
"ctrl p | |
":noremap <Leader>, :CtrlP<cr> | |
:noremap <Leader>. :CtrlPMRU<cr> | |
:noremap <Leader>k :CtrlPTag<cr> | |
":set tags=/my/dir/tags | |
"ctags -R . //creates ctag file recursively | |
"common snippets | |
:noremap <Leader>de ovar_dump();exit();<esc>bbhh | |
:noremap <Leader>dv ovar_dump();<esc>h | |
:noremap <Leader>dd odie();<esc>h | |
":noremap <Leader>t o<?php ; ?><esc>bb | |
"for drupal syntax highlighting | |
":nmap <leader>pp :set syntax=php<cr> | |
"don't use php code sniffer | |
let g:syntastic_php_checkers=['php'] | |
"disable macro record | |
:nmap q <NOP> | |
"disable man lookup | |
:nmap K <NOP> | |
"disable ctrl+p default binding | |
:nmap <C-p> <NOP> | |
"ref laptop laptop ip address | |
:let g:vim_pbcopy_host = "[email protected]" | |
"clear search | |
:noremap <leader>s :let @/ = ""<cr> | |
"run tests on current file | |
nmap <leader>t :!clear && phpunit %<cr> | |
" Disable Arrow keys in Escape mode | |
map <up> <nop> | |
map <down> <nop> | |
map <left> <nop> | |
map <right> <nop> | |
" Disable Arrow keys in Insert mode | |
imap <up> <nop> | |
imap <down> <nop> | |
imap <left> <nop> | |
imap <right> <nop> | |
"easy tab switching | |
":noremap <Leader>f gt | |
":noremap <Leader>d gT | |
"copy paste register | |
":noremap <Leader>p "+P | |
":noremap <Leader>y "+y | |
"nnoremap <Leader>y :call system('nc localhost 8377', @0)<CR> | |
"map escape key to jj | |
":imap jj <Esc> | |
" PyMatcher for CtrlP | |
"if !has('python') | |
"echo 'in order to use pymatcher plugin, you need +python compiled vim' | |
"else | |
"let g:ctrlp_match_func = { 'match': 'pymatcher#pymatch' } | |
"endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment