forked from natduca/quickopen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
105 lines (80 loc) · 3.64 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Open files in Vim or Emacs quickly with fuzzy expressions and a live-updating
UI, even for directory-trees containing hundreds of thousands of files.
Fuzzy? When you enter "rwh", quickopen finds files like
RenderWidgetHost
render-widget-host
threaded_window_handler
The results are ranked by relevance. In 10s of milliseconds. So you get new results
as you type. Thus, you might refine 'rwh' to 'rwhcpp' to get
render_widget_host.cpp
Key features:
- Blazingly fast! 15ms search time on full 180k-file Chrome directory tree.
- Integration with vim gf and emacs ff-find-other-file when they get stuck
- Index maintained in-memory, persists across editor sessions/instances
- Reasonablly pretty GUI, with fallback to curses in terminal sessions
- Same backend shared between emacs and vim
Coming soon:
- Searches influenced by open/current buffers
Dependencies
================================================================================
Linux:
python-gtk2
OSX:
http://www.wxpython.org/download.php#stable
wxPython 2.8-osx-unicode-2.6
Setting up the quickopen daemon
================================================================================
0. Start quickopend
nduca: ~/quickopen $ ./quickopend&
Starting quickopen daemon on port 10248
1. Tell quickopen to index some directories...
nduca: ~/quickopen $ ./quickopen add ~/chromium
nduca: ~/quickopen $ ./quickopen add ~/quickopen
nduca: ~/quickopen $ ./quickopen ignore \*LayoutTests\*
2. Check quickopen's status:
nduca: ~/quickopen $ ./quickopen rawsearch foo
Database is not fully indexed. Wait a bit or try quickopen status
nduca: ~/quickopen $ ./quickopen status
Syncing: 17802 files found, 116 dirs pending
nduca: ~/quickopen $ ./quickopen status
up-to-date: 158553 files indexed; 2-threaded searches
VIM Setup
================================================================================
Using pathogen:
1. http://github.com/tpope/vim-pathogen
2. git submodule add https://github.com/natduca/quickopen ~/.vim/bundle/quickopen
By hand:
1. source quickopen/plugin/quickopen.vim
Emacs Setup
================================================================================
By hand:
(load quickopen/elisp/quickopen.el)
Using site-lisp:
git clone https://github.com/natduca/quickopen.git ~/.emacs/site-lisp
And if site-lisp isn't set up yet:
(let ((site-lisp-dir (expand-file-name "~/.emacs/site-lisp")))
(when (file-exists-p site-lisp-dir)
(let ((default-directory site-lisp-dir))
(normal-top-level-add-to-load-path '("."))
(normal-top-level-add-subdirs-to-load-path))))
Consider setting up binding ff-find-other-file to a hotkey if you haven't done
so already. Quickopen will be used if the basic ff-find-other-file produces no
results:
(global-set-key (kbd "M-o") (lambda ()
(interactive "")
(ff-find-other-file)
))
(global-set-key (kbd "M-O") (lambda ()
(interactive "")
(ff-find-other-file t)
))
Usage
================================================================================
1. VIM: C-O (ctrl-shift-o) to open
gf c-w to goto file
Emacs: M-S-o (meta-shift-o) to open
C-Q to open
2. Command line
nduca: ~/quickopen $ ./quickopen
<brings up a GUI for a picking a file,
prints file picked to stdout once done>