Skip to content

Instantly share code, notes, and snippets.

diff --git a/autoload/phpcomplete.vim b/autoload/phpcomplete.vim
index 1df1b40..01ba987 100644
--- a/autoload/phpcomplete.vim
+++ b/autoload/phpcomplete.vim
@@ -1146,7 +1146,7 @@ endfunction " }}}
function! s:readfileToTmpbuffer(file) " {{{
let cfile = join(readfile(a:file), "\n")
- silent! below 1new
+ silent! below new
@complex857
complex857 / noequalalways.patch
Created February 17, 2015 08:02
Patch tryin' to fix phpcomplete while "set noequalalways"
commit 101e3f4f349c8fe08c45bba1c00fa60bc50b1520
Author: dudu <[email protected]>
Date: Tue Feb 17 08:54:30 2015 +0100
Add equalalways manipulation to fix running out of space issues
diff --git a/autoload/phpcomplete.vim b/autoload/phpcomplete.vim
index 2a1329a..8a72a7d 100644
--- a/autoload/phpcomplete.vim
+++ b/autoload/phpcomplete.vim
@complex857
complex857 / .viminfo
Created October 17, 2014 12:56
sytactic locked var errros #1220
# This viminfo file was generated by Vim 7.4.
# You may edit it if you're careful!
# Value of 'encoding' when this file was written
*encoding=utf-8
# hlsearch on (H) or off (h):
~h
# Command Line History (newest to oldest):
@complex857
complex857 / ctags-better-php.rb
Last active August 29, 2015 13:57
Ctags with the better-php-parser patches
require 'formula'
class CtagsBetterPhp < Formula
homepage 'http://ctags.sourceforge.net/'
url 'https://github.com/shawncplus/phpcomplete.vim/raw/master/misc/ctags-5.8_better_php_parser.tar.gz'
sha1 'bde914ed865868d9f50a8d68a35253c8e23a15f2'
# fixes http://sourceforge.net/tracker/?func=detail&aid=3247256&group_id=6556&atid=106556
def patches
{ :p2 => DATA }
@complex857
complex857 / phpcomplete.vim
Created February 28, 2014 10:35
phpcomplete.vim bundle
This file has been truncated, but you can view the full file.
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Maintainer: Shawn Biddle ( shawn AT shawnbiddle DOT com )
" Maintainer: Szabó Dávid ( complex857 AT gmail DOT com )
"
" OPTIONS:
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).
@complex857
complex857 / phpcomplete.vim
Created January 15, 2014 20:26
One file phpcomplete.vim bundle
This file has been truncated, but you can view the full file.
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Maintainer: Shawn Biddle ( shawn AT shawnbiddle DOT com )
" Maintainer: Szabó Dávid ( complex857 AT gmail DOT com )
"
" OPTIONS:
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Maintainer: Shawn Biddle ( shawn AT shawnbiddle DOT com )
"
" OPTIONS:
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).
" This generates E_STRICT level warning, but php calls these methods nontheless.
@complex857
complex857 / 0000-PHP-parser-rewrite-full-string-parameters.patch
Created June 2, 2013 09:55
The new tokenizer based patch for ctags http://sourceforge.net/p/ctags/patches/83/ with full string parameters instead of '...' in the signature fields.
Index: Test/bug681824.php
===================================================================
--- Test/bug681824.php (revision 804)
+++ Test/bug681824.php (working copy)
@@ -1,3 +1,4 @@
+<?php
// Bugs item #681824, was opened at 2003-02-06 18:14
// You can respond by visiting:
// https://sourceforge.net/tracker/?func=detail&atid=106556&aid=681824&group_id=6556
Index: Test/simple.php
@complex857
complex857 / Instructions.md
Last active December 16, 2015 18:18
Please try out phpcomplete.vim with these test files.
  1. Save the gist files to a directory

  2. Open vim from that directory

  3. :echo tagfiles() should print ['tags'], so we can confirm tags found, the file was generated with ctags -R .

  4. Open test.php with :e test.php

  5. Hit <c-x><c-o> at the marked place (at the end of line 4)

  6. In the completion popup you should see:

     findme    ( f $a, $b = 'foo'
     findme_too( f $a, $b = 'foo'
    
<?php
class MY_Controller extends CI_Controller {
public function __construct() {
parent::__construct();
require_once APPPATH. '/libraries/MtHaml/Autoloader.php'; // or whereever you put that file
\MtHaml\Autoloader::register();
$this->haml = new MtHaml\Environment('twig');
}