Skip navigation.
Home

Open a filer window showing a file I'm editing

There are various possibilities:

  • ROX-style applications like Edit should already have an Up button on their toolbar for this.

  • You can get some window managers to provide such a button in the title bar. This code creates a change-to-parent action for sawfish:

    (defun change-to-parent (window)
      "Close window and open the parent directory viewer"
      (interactive "%W")
      (let ((title (caddr (get-x-property window 'WM_NAME))))
        (when (and title (string-match "[~/][^*?]+" title))
          (let ((path (substring title (match-start 0) (match-end 0))))
            (system (concat "rox -s " path))
            (delete-window-safely window)
    ))))
  • You can script other applications. For example, Stephen Watson gives these instructions for Emacs:

    (defun rox-view-file (file)
      "Open ROX-Filer window for named file"
      (interactive "fFile to show: ")
      (call-process "rox" nil 0 nil "-s" file)
      )
    (defun rox-view-current ()
      "Open ROX-Filer window for the current file"
      (interactive)
      (rox-view-file buffer-file-name)
      )
  • For Vim (or GVim), put this in your ~/.vimrc file:

      map <F12> :silent !rox -s %<CR>
Syndicate content