aboutsummaryrefslogtreecommitdiffstats
path: root/oni-php/snippets/php-mode
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2024-12-30 11:26:11 -0800
committerGravatar Tom Willemsen2024-12-30 11:26:11 -0800
commit233c57fc89be6ea3ef14a91d7fbb3e498ab76673 (patch)
tree81b1eb917e047444fc281004089064f9d1466775 /oni-php/snippets/php-mode
parented273e59d23e837298088578417465e229056fec (diff)
downloademacs-config-233c57fc89be6ea3ef14a91d7fbb3e498ab76673.tar.gz
emacs-config-233c57fc89be6ea3ef14a91d7fbb3e498ab76673.zip
Add snippet to add the namespace to a file
Diffstat (limited to 'oni-php/snippets/php-mode')
-rw-r--r--oni-php/snippets/php-mode/namespace5
1 files changed, 5 insertions, 0 deletions
diff --git a/oni-php/snippets/php-mode/namespace b/oni-php/snippets/php-mode/namespace
new file mode 100644
index 0000000..a63d713
--- /dev/null
+++ b/oni-php/snippets/php-mode/namespace
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: namespace
+# key: ns
+# --
+namespace ${1:`(string-join (mapcar #'capitalize (cdr (split-string (directory-file-name (file-name-directory (file-relative-name buffer-file-name (project-root (project-current))))) "/"))) "\\")`}; \ No newline at end of file