diff --git a/.editorconfig b/.editorconfig index 87c4a41..9056ea4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,15 +1,25 @@ ; http://editorconfig.org/ [*] indent_style = space indent_size = 2 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [src/markup/engine/__tests__/remarkup/*.txt] trim_trailing_whitespace = false insert_final_newline = false +[src/parser/__tests__/languageguesser/*] +indent_style = + [Makefile] indent_style = tab + +[externals/**] +; Use editor default (possible autodetection). +indent_style = +indent_size = +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/resources/textmate/local_definition.tmCommand b/resources/textmate/local_definition.tmCommand index 8b95ccd..cccbffb 100644 --- a/resources/textmate/local_definition.tmCommand +++ b/resources/textmate/local_definition.tmCommand @@ -1,80 +1,81 @@ - beforeRunningCommand - nop - command - #!/usr/bin/env php + beforeRunningCommand + nop + command + #!/usr/bin/env php <?php if (getenv('TM_SELECTED_TEXT')) { $word = getenv('TM_SELECTED_TEXT'); } else { $word = getenv('TM_CURRENT_WORD'); } $file = getenv('TM_FILEPATH'); if (!is_dir($file)) { $file = dirname($file); } $file = escapeshellarg($file); $ref = null; $err = 0; $root = exec("(cd {$file} && /usr/bin/env git rev-parse --show-cdup)", $ref, $err); if ($err) { echo "File is not in a git working copy.\n"; exit($err); } $word = preg_quote($word, $delim = NULL); $patterns = array( "((abstract|final) +)*class +{$word}( |$)", "interface +{$word}( |$)", "function +&?{$word}( |\(|$)", " *const +{$word}( |=|$)", "@provides {$word}( |$)", ); foreach ($patterns as $k => $pattern) { $patterns[$k] = '-e '.escapeshellarg($pattern); } $patterns = implode(' --or ', $patterns); $err = 0; $cmd = "(cd {$root} && /usr/bin/env git grep --no-index -n -z -I -E {$patterns} | head -n1)"; $output = exec($cmd, $ref, $err); $output = trim($output); if (!$output) { $untracked = exec("(cd {$root} && /usr/bin/env git ls-files --others --exclude-standard)"); if ($untracked) { echo "No results found, but you have untracked files which 'git grep' does not search.\n"; } else { echo "No results found.\n"; } exit(0); } list($local, $line) = explode("\0", $output); $target = $root.'/'.$local; exec('/usr/bin/env mate '.escapeshellarg($target).' -l '.escapeshellarg($line)); - fallbackInput - word - input - selection - keyEquivalent - @ - name - Open Definition (PHP, Local Git) - output - showAsTooltip - scope - source.php - uuid - 0D267B50-2E9C-4B48-9D0C-0FB8E9807552 + fallbackInput + word + input + selection + keyEquivalent + @ + + name + Open Definition (PHP, Local Git) + output + showAsTooltip + scope + source.php + uuid + 0D267B50-2E9C-4B48-9D0C-0FB8E9807552 diff --git a/resources/textmate/php_property.tmSnippet b/resources/textmate/php_property.tmSnippet index da2a180..e945e0b 100644 --- a/resources/textmate/php_property.tmSnippet +++ b/resources/textmate/php_property.tmSnippet @@ -1,25 +1,25 @@ - content - ${2:public} function set${1/./\u$0/}(\$${1/[A-Z]+/_\L$0\E/g}) { + content + ${2:public} function set${1/./\u$0/}(\$${1/[A-Z]+/_\L$0\E/g}) { \$this->${1:property} = \$${1/[A-Z]+/_\L$0\E/g}; return \$this; } ${2:public} function get${1/./\u$0/}() { return \$this->$1; } $0 - name - PHP Property - scope - source.php - tabTrigger - prop - uuid - 7C1971CD-6BC0-433B-8604-9F008B6CC29D + name + PHP Property + scope + source.php + tabTrigger + prop + uuid + 7C1971CD-6BC0-433B-8604-9F008B6CC29D diff --git a/resources/textmate/trailing_whitespace.tmMacro b/resources/textmate/trailing_whitespace.tmMacro index 27c1921..b8d3159 100644 --- a/resources/textmate/trailing_whitespace.tmMacro +++ b/resources/textmate/trailing_whitespace.tmMacro @@ -1,43 +1,43 @@ - commands - - - argument - - beforeRunningCommand - nop - command - perl -pe 's/[\t ]+$//g' - input - document - output - replaceDocument - - command - executeCommandWithOptions: - - - argument - - beforeRunningCommand - saveActiveFile - input - none - output - discard - - command - executeCommandWithOptions: - - - keyEquivalent - @s - name - Remove Trailing Space and Save - uuid - F61A9B5A-A31E-45C0-8A08-968A50664CC3 + commands + + + argument + + beforeRunningCommand + nop + command + perl -pe 's/[\t ]+$//g' + input + document + output + replaceDocument + + command + executeCommandWithOptions: + + + argument + + beforeRunningCommand + saveActiveFile + input + none + output + discard + + command + executeCommandWithOptions: + + + keyEquivalent + @s + name + Remove Trailing Space and Save + uuid + F61A9B5A-A31E-45C0-8A08-968A50664CC3