Skip to content

A fast and easy way to switch between files (following #includes, .c -> .h, etc)

Notifications You must be signed in to change notification settings

hardaker/elisp-switch-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 

Repository files navigation

Overview

switch-files is a utility to help you easily switch between files. It knows how to do two things well:

  1. Find a matching “header” or other file and switch to it even if it is not located in the same directory as the base file. For example, if you’re editing “foo.c” then it can auto-switch-to (and open if necessary) the “foo.h” file even if it’s not in the same directory.
  2. Follow file references when sitting on an “include” statement. For example, if in C we had:
#include "bar.h"

and if the cursor was sitting on the line when switch-files was invoked, then switch-files would jump to the bar.h file.

  1. Keep track of your path. If you switch from one file to another by following either of the usage patterns in #1 or #2 then it’s a simple key-stroke to get back to where you came from.

Usage

(require 'switch-files)

;; XXX: document how to extend the lists
;;
;; eg:
;;   - extend switch-files-list
;;   - extend switch-file-paths

About

A fast and easy way to switch between files (following #includes, .c -> .h, etc)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published