Skip to content
Commits on Dec 31, 2015
  1. @sorbits

    Fix exception when using header completion for untitled documents

    sorbits committed
    This only affected user headers since here we search current folder but was checking that current folder wasn’t nil rather than the empty string.
Commits on Nov 19, 2014
  1. @sorbits
Commits on Jun 18, 2014
  1. @infininight

    Point to ruby 1.8 shim

    infininight committed
    Using a shim allows us to catch when 1.8 of ruby is not present and provide other options.
    
    #ignore
Commits on Jul 27, 2013
  1. @infininight

    Use version 1.8 of ruby for bundle items

    infininight committed
    10.7 and 10.8 only include ruby 1.8, so all bundle items have been written to work with that. Optionally supporting ruby 1.9 and 2.0 is problematic as these versions are not fully backwards compatible.
    
    #ignore
Commits on Mar 24, 2013
  1. @sorbits

    Use clang as default compiler (⌘R and “Insert Missing Includes”)

    sorbits committed
    Clang is called via ‘xcrun clang’ so it requires that you have Xcode installed.
    
    If you wish to use another compiler you can set ‘TM_GCC’ and ‘TM_GXX’ for C/Objective-C and C++/Objective-C++ respectively. This variable is no longer being “shell escaped” (which is what allows setting it to something like ‘xcrun clang’).
Commits on Mar 13, 2013
  1. @joachimm
Commits on Aug 4, 2012
  1. @sorbits

    Improve header search.

    sorbits committed
  2. @sorbits

    Read (user) compiler and flags from environment.

    sorbits committed
    This makes the TM_{SYS,USR}_HEADER_PATH variables redundant as one can instead set (e.g.) TM_CXX_FLAGS to "-I$HOME/include" or similar.
    
    It also means we don’t find C++ headers when in a C file.
Commits on Jul 28, 2012
  1. @sorbits
Commits on Jul 11, 2012
  1. @sorbits

    Rewrite script to search for headers.

    sorbits committed
    The script can now be used either with -p/--prefix to find a header with the given prefix, or with -s/--search to find a header with the given name.
    
    There is also a -d/--domain parameter which can be set to ‘system’, ‘user’, or ‘all’, to select which domain to search.
    
    Finally there is a new -C/--basedir parameter, this should be used when searching the user domain since the user domain includes the source’s directory (which this script doesn’t know about).
    
    A change is that we now append the compiler supplied include paths to the user include paths (set via the TM_{USR,SYS}_HEADER_PATH environment variable).
Commits on Mar 23, 2012
  1. @sorbits

    Skip non-existing directories.

    sorbits committed
    These would otherwise cause an error (and can be the result of a typo in the compiler search path variables).
  2. @sorbits

    Let completion command use an executable in the bundle’s support folder.

    sorbits committed
    This allows sharing the code with other commands that need to get the list of headers.
Commits on Oct 19, 2008
  1. Slight remodeling of C.tmbundle's Run command:

    Alex Ross committed
      • Use TM_GXX to override the compiler in C++ mode, instead of TM_GPP.
      • You may set TM_GCC_FLAGS / TM_GXX_FLAGS to add compiler flags in C / C++ mode respectively.  Note that these strings will be subject to bash expansion, so you may include environment variables such as $HOME.
      • Default TM_GCC_FLAGS="-Wall -include stdio.h". Default TM_GXX_FLAGS=" -Wall -include stdio.h -include iostream"
        So you can run a script like: int main() { printf("Hello, World!"); return 0; } and it will *just work*.
    
    
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@10733 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  2. • eval \${$#} instead of \$$# so that `last` is actually set to the l…

    Alex Ross committed
    …ast argument in the case where there are more than 9 args.
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@10731 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Oct 11, 2008
  1. • Moved as much logic as possible from bootstrap.sh to Run.tmcommand.

    Alex Ross committed
    • Use the new :bootstrap option to Executor instead of embedding it at the front of the other arguments to Executor.
    • Also, escape spaces in ENV["TM_FILEPATH"] before passing it to Executor.
    
    
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@10708 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Oct 10, 2008
  1. I've modified the “bootstrap.sh” script in the C.tmbundle to override…

    Alex Ross committed
    … the gcc compiler with TM_GCC in C mode and the g++ compiler with TM_GPP in C++ mode. You can set these variables per-project or in TextMate's preferences.
    
    I've also modified the Run command to add the arguments listed in TM_GCC_ARGS to the calls to gcc and g++.  This variable should be a space separated list and it can be set per-project or in TextMate's preferences.
    
    
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@10702 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Oct 4, 2008
  1. @joachimm

    made c and c++ completion Dialog2 aware, this time with the actual co…

    joachimm committed
    …mpletion file added
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@10668 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Sep 16, 2008
  1. [NEW] Executor based “Build and Run” command for C/C++ that works lik…

    Alex Ross committed
    …e the Run command of Ruby/Python bundle.
    
    Incidentally, the technique I used here could be useful for Java or other compiled languages.  We write our own bootstrap script to take the place of the interpreter.  The bootstrap script compiles the current file and runs the resulting executable.  This lets us use Executor unmodified, and we get all of executors features.
    
    
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@10569 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Feb 24, 2008
  1. @joachimm

    forgot to add the command

    joachimm committed
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@8997 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Sep 23, 2007
  1. @sorbits
Commits on Sep 22, 2007
  1. @sorbits

    • also scan gzipped man files

    sorbits committed
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@8194 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Apr 8, 2007
  1. @joachimm

    fixed malformed content in the C completions list

    joachimm committed
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@6969 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Mar 31, 2007
  1. @joachimm
Commits on Mar 5, 2007
  1. @joachimm
Commits on Feb 14, 2007
  1. @joachimm

    added C++ STL Algorithms to completion command

    joachimm committed
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@6587 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Dec 15, 2006
  1. @joachimm

    [NEW] A partially typed function from the C Library can be completed …

    joachimm committed
    …using ^M, a menu is presented if there are multiple candidates
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@6352 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on May 9, 2006
  1. @sorbits

    • rather than remove keywords (like if/while/for/…) from the resultin…

    sorbits committed
    …g set, these are now removed from the source.
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@3289 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Apr 27, 2006
  1. @sorbits

    • use ${0} instead of $0 in the inserted snippet (to place caret), as…

    sorbits committed
    … otherwise, if caret is in front of numbers, those will be parsed as part of the tab stop
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@3138 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Apr 21, 2006
  1. @sorbits

    This macro/script will scan the current source for function calls (us…

    sorbits committed
    …ing a regexp) then call man (looking in section 2 and 3) for each function found, harvest #include lines from that man page (in the SYNOPSIS), and then insert these in the top of the source. Key equivalent is ctrl-#.
    
    Potential improvements:
     1) use a look-up table instead of calling man because:
        a) faster
        b) more precise, e.g. the printf man page also lists stdarg.h under vprintf
        c) more stuff can be added (STL, Cocoa, etc.)
     2) inserted includes should insert extra blank line when the source has no includes, and when the source only has system includes, it should insert immediately below, not n blank lines below
     3) make it use XML input, so we can strip comments, strings, and keywords from what gets parsed for function calls
     4) also find use of data structures in the source (vector, map, string, etc.)
    
    I welcome user contributions, as I probably won’t work on this myself.
    
    
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@3071 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Dec 7, 2005
  1. Sometimes TM_PROJECT_DIR is "/", but we do not wish to search "/", be…

    Chris Thomas committed
    …cause that takes forever and may return many results we do not actually want. Fall back to TM_DIRECTORY and then exclude the user dir altogether if that's no good either.
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@2409 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Dec 2, 2005
  1. Fix the project search path

    Chris Thomas committed
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@2369 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Dec 1, 2005
  1. Quick Open: Use mdfind (where available) to find headers. On Tiger, t…

    Chris Thomas committed
    …his gives us much more complete coverage and handles more input forms ("AppKit/NSColor", "AppKit/NSColor.h", "NSColor.h", "NSColor", "sys/errno.h", "errno.h", "errno", "cstdio", "IOKit/firewire/IOFireWireDevice.h" should all work as expected), and speed still seems reasonable.
    
    The previous 'find'-based method is used if the mdfind tool isn't found.
    
    It may make sense to add a TM_USE_MDFIND control variable if some prefer the older version. I'm not sure it's needed or desirable.
    
    git-svn-id: http://svn.textmate.org/trunk/Bundles/C.tmbundle@2351 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Something went wrong with that request. Please try again.