summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorDante Catalfamo2020-06-25 12:26:42 -0400
committerDante Catalfamo2020-06-25 12:28:22 -0400
commit5ed1fa6136f473501b1dfb7151e8fc218ae9647c (patch)
treed7972b279e6ab930085c27fad92b5a58f5be7886 /content
parent74404ab6a96d911d530a74de490ebd9a6f3e80d3 (diff)
downloadblog-5ed1fa6136f473501b1dfb7151e8fc218ae9647c.tar.gz
blog-5ed1fa6136f473501b1dfb7151e8fc218ae9647c.tar.bz2
blog-5ed1fa6136f473501b1dfb7151e8fc218ae9647c.zip
Add Emacs dired-subtree post
Diffstat (limited to 'content')
-rw-r--r--content/.gitkeep0
-rw-r--r--content/posts/dired-expand-dir-on-tab/dired-subtree.pngbin0 -> 90453 bytes
-rw-r--r--content/posts/dired-expand-dir-on-tab/index.org37
3 files changed, 37 insertions, 0 deletions
diff --git a/content/.gitkeep b/content/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/content/.gitkeep
+++ /dev/null
diff --git a/content/posts/dired-expand-dir-on-tab/dired-subtree.png b/content/posts/dired-expand-dir-on-tab/dired-subtree.png
new file mode 100644
index 0000000..561dcb1
--- /dev/null
+++ b/content/posts/dired-expand-dir-on-tab/dired-subtree.png
Binary files differ
diff --git a/content/posts/dired-expand-dir-on-tab/index.org b/content/posts/dired-expand-dir-on-tab/index.org
new file mode 100644
index 0000000..7e189e3
--- /dev/null
+++ b/content/posts/dired-expand-dir-on-tab/index.org
@@ -0,0 +1,37 @@
+#+TITLE: Expanding a Directory With Tab in Dired Mode
+#+DATE: 2020-06-25T12:02:59-04:00
+#+DRAFT: true
+#+DESCRIPTION: How to setup Emacs to expand dired directories on TAB
+#+TAGS[]: emacs
+#+KEYWORDS[]: emacs dired
+#+SLUG:
+#+SUMMARY:
+
+#+ATTR_HTML: :alt dired-subtree expanded
+#+ATTR_HTML: :title dired-subtree Expanded
+[[file:dired-subtree.png]]
+
+=dired= mode is one of my favourite features of Emacs. I use it so
+often, it's pretty much my go-to file browser. I use it both on my
+local machine, and on remote machines via TRAMP. One feature of
+=dired= is the ability to enter sub-directories in the same buffer by
+inserting the contents under the current directory. While this is
+useful, I often want something quicker to check the contents of a
+directory without either opening it in a new buffer, or inserting it
+below.
+
+The workaround for this I use is by using the excellent [[https://melpa.org/#/dired-subtree][dired-subtree]]
+package and the following ~use-package~ definition.
+
+#+BEGIN_SRC elisp
+(use-package dired-subtree
+ :ensure t
+ :after dired
+ :bind (:map dired-mode-map
+ ("TAB" . dired-subtree-toggle)))
+#+END_SRC
+
+Now whenever I want to expand a directory, I move my cursor over it
+and press the @@html: <kbd>Tab ↹</kbd>@@ key. Pressing
+@@html: <kbd>Tab ↹</kbd>@@ again on the same entry will collapse it
+and hide the contents again.