cpp.json 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {
  2. // This file contains snippets that might be useful to you for Chrome
  3. // development.
  4. "Chrome Header": {
  5. "prefix": "hdr",
  6. "body": [
  7. "// Copyright ${CURRENT_YEAR} The Chromium Authors. All rights reserved.",
  8. "// Use of this source code is governed by a BSD-style license that can be",
  9. "// found in the LICENSE file.",
  10. "${0:",
  11. "#ifndef ${TM_FILEPATH/(^\\/.*\\/src\\/)|([^a-zA-Z0-9])|([a-zA-Z0-9])/${2:+_}${3:/upcase}/g}_",
  12. "#define ${TM_FILEPATH/(^\\/.*\\/src\\/)|([^a-zA-Z0-9])|([a-zA-Z0-9])/${2:+_}${3:/upcase}/g}_",
  13. "",
  14. "#endif // ${TM_FILEPATH/(^\\/.*\\/src\\/)|([^a-zA-Z0-9])|([a-zA-Z0-9])/${2:+_}${3:/upcase}/g}_}",
  15. ]
  16. },
  17. "Chrome Copyright": {
  18. "prefix": "copyright",
  19. "body": [
  20. "// Copyright ${CURRENT_YEAR} The Chromium Authors. All rights reserved.",
  21. "// Use of this source code is governed by a BSD-style license that can be",
  22. "// found in the LICENSE file.",
  23. ]
  24. },
  25. "Chrome Log": {
  26. "prefix": "log",
  27. "body": "LOG(ERROR) << \"${1:message}\";",
  28. "description": "Chrome Log output to console"
  29. },
  30. "Stack trace": {
  31. "prefix": "st",
  32. "body": "base::debug::StackTrace().Print();"
  33. },
  34. "Stack trace header": {
  35. "prefix": "sth",
  36. "body": "#include \"base/debug/stack_trace.h\""
  37. }
  38. }