summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/fish_automatic_cd.fish21
-rw-r--r--examples/rc_emacs.conf8
2 files changed, 27 insertions, 2 deletions
diff --git a/examples/fish_automatic_cd.fish b/examples/fish_automatic_cd.fish
new file mode 100644
index 00000000..d097ddd1
--- /dev/null
+++ b/examples/fish_automatic_cd.fish
@@ -0,0 +1,21 @@
+# Automatically change the directory in fish after closing ranger
+#
+# This is a fish alias to automatically change the directory to the last visited
+# one after ranger quits.
+# To undo the effect of this function, you can type "cd -" to return to the
+# original directory.
+#
+# Note: funcsave save the alias in fish's config files, you do not need to copy
+# this file anywhere, just execute it once
+
+function ranger-cd
+    set dir (mktemp -t ranger_cd.XXX)
+    ranger --choosedir=$dir
+    cd (cat $dir) $argv
+    rm $dir
+    commandline -f repaint
+end
+funcsave ranger-cd
+
+# To bind Ctrl-O to ranger-cd, save this in `~/.config/fish/config.fish`:
+bind \co ranger-cd
diff --git a/examples/rc_emacs.conf b/examples/rc_emacs.conf
index e3596ba5..3b086efd 100644
--- a/examples/rc_emacs.conf
+++ b/examples/rc_emacs.conf
@@ -59,6 +59,9 @@ set vcs_backend_git enabled
 set vcs_backend_hg disabled
 set vcs_backend_bzr disabled
 
+# Truncate the long commit messages to this length when shown in the statusbar.
+set vcs_msg_length 50
+
 # Use one of the supported image preview protocols
 set preview_images false
 
@@ -128,10 +131,11 @@ set display_free_space_in_status_bar true
 # Display files tags in all columns or only in main column?
 set display_tags_in_all_columns true
 
-# Set a title for the window?
+# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
+# properties.
 set update_title false
 
-# Set the title to "ranger" in the tmux program?
+# Set the tmux window-name to "ranger"?
 set update_tmux_title true
 
 # Shorten the title if it gets long?  The number defines how many