Skip to content

HyperionAnalytics/IPythonNotebook_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPython Notebook Search and Replace With RegEx Support

IPython Notebook extension enabling search, replace, and replace all functionality with regular expression support.
This extension works only in IPython notebook v.2.x.x.

Installation

These installation instructions are for "vanilla" IPython Notebook setup. If you have themed and customized your IPython Notebook, I will assume you know how to patch this into custom.css and custom.js files.

Linux and OS X

Copy custom.css and custom.js files into:
~/.ipython/profile_default/static/custom
You will overwrite two existing place-holding files with same names.

Copy search.js into:
~/.ipython/nbextensions

Windows

Copy custom.css and custom.js files into:
C:\Users\YourUserName\.ipython\profile_default\static\custom
You will overwrite two existing place-holding files with same names.

Copy search.js into:
C:\Users\YourUserName\.ipython\nbextensions

Keyboard Shortcuts

Linux and Windows

Search: Crtl - f
Find next: Ctrl - g
Find previous: Ctrl - Shift - g

Replace: Ctrl - Shift - f

Replace all: Ctrl - Shift - r

OS X

Search: Cmd - f
Find next: Cmd - g
Find previous: Cmd - Alt - g

Replace: Cmd - Alt - f

Replace all: Cmd - Alt - r

Using Extension

The extension works in cell edit mode and operates only on currently edited cell.

Find / Search

Invoke find / search dialog with Crtl - f or Cmd - f, input search term into the dialog text box (RegEx must be enclosed between two forward slashes /regex_search/), and hit Enter. This will highlight all found instances in yellow, with selected one being highlighted in dark yellow. Move forward Ctrl - g, Cmd - g, and backward Ctrl - Shift - g, Cmd - Alt - g. Selected instance can be modified in place.
alt txt
alt txt

Replace

Invoke replace dialog with Ctrl - Shift - f or Cmd - Alt - f, input replace-search term into the dialog text box (RegEx must be enclosed between two forward slashes /regex_search/), and hit Enter. Input replace-with term into the dialog text box, and hit Enter. Click Yes or No buttons to replace highlighted instance or Stop to exit replace mode.
alt txt alt txt

Replace All

Invoke replace all with Ctrl - Shift - r or Cmd - Alt - r, input replace-search term into the dialog text box (RegEx must be enclosed between two forward slashes /regex_search/), and hit Enter. Input replace-all term into the dialog text box, and hit Enter.

Credits

This extension was compiled from IPython contrib repo and Joel Moberg's repo, and uses CodeMirror search.js for its functionality.

About

IPython Notebook extension enabling search and replace functionality with regular expression.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors