Created
November 19, 2012 14:34
-
-
Save malko/4110954 to your computer and use it in GitHub Desktop.
vimrc
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
" I like highlighted search results | |
set hlsearch | |
" Use incremental searching | |
set incsearch | |
" Auto indent after a { | |
set autoindent | |
set smartindent | |
" Do not wrap lines automatically | |
set nowrap | |
set number | |
set tabstop=2 | |
set shiftwidth=2 | |
set nobackup | |
set ignorecase " caseinsensitive searches | |
set ruler " show line and column information | |
set showmatch " show matching brackets | |
set foldmethod=indent | |
set nofoldenable | |
syntax on | |
" This function determines, wether we are on the start of the line text (then tab indents) or | |
" if we want to try autocompletion | |
function InsertTabWrapper() | |
let col = col('.') - 1 | |
if !col || getline('.')[col - 1] !~ '\k' | |
return "\<tab>" | |
else | |
return "\<c-p>" | |
endif | |
endfunction | |
" Remap the tab key to select action with InsertTabWrapper | |
inoremap <tab> <c-r>=InsertTabWrapper()<cr> | |
"####### ETUDIER CES COMANDES ######## | |
"" Map <CTRL>-B to run PHP parser check | |
"noremap <C-B> :!php -l %<CR> | |
"" The completion dictionary is provided by Rasmus: | |
"" http://lerdorf.com/funclist.txt | |
"set dictionary-=/home/pookey/funclist.txt dictionary+=/home/pookey/funclist.txt | |
"" Use the dictionary completion | |
"set complete-=k complete+=k | |
""set formatoptions=tcqor | |
""set whichwrap=b,s,<,>,[,] | |
"" CTRL-C = SVN Commit | |
"map <C-C> :w<CR>:!svn commit<CR> | |
"#################################### | |
"set number | |
"set tabstop=2 | |
"set showmatch | |
"set shiftwidth=2 | |
"set autoindent | |
"set nobackup | |
"iab <? <?php<NL><NL>?> | |
"iab p( print(""); | |
"iab td* <td></td> | |
"iab tab* <table border=1 cellpadding=0 cellspacing=0><NL><NL></table> | |
"iab form* <form method=post action= ><NL><NL></form> | |
"iab input* <input type= name= value=> | |
"iab todo //-- TODO | |
"iab optim //-- OPTIMISE | |
"iab warning //-- ::WARNING:: ::WARNING:: --// | |
"iab 50* /**************************************************§<NL>§**************************************************/ | |
"iab /** /**<NL>* DESC =><NL>* ARGS =><NL>* RETURN=><NL>**/ | |
"iab fx* function ( ){<NL><NL>} | |
"iab wh* while( ){<NL><NL>} | |
"iab for* for( $i = 0 ; $i ; $i++){<NL><NL>} | |
"iab fore* foreach( as $k=>$v ){<NL><NL>} | |
"iab if* if( ){<NL><NL>}else{<NL><NL>}<NL> | |
"iab sw* switch(){<NL> case :<NL><NL>break;<NL>default:<NL>} | |
"iab then* IF [ ]; THEN<NL><NL>FI | |
"iab mysqlf mysql_fetch_object | |
"iab mysqlq mysql_query | |
"iab mysqla mysql_affected_rows | |
"iab in* <input type= name=> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment