Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to do a history search in nrepl?

You know how when you hit the up arrow in bash it will fill in the last command you typed in? Is there any way to do this in nrepl?

So far I've been doing a reverse search (C-r), typing the first few characters of the line in question, killing the line(s) (C-k), jumping to the end of the buffer (M->) and yanking the killed line (C-y). Is there an easier way to do this?

like image 452
Cam Saul Avatar asked Feb 28 '13 05:02

Cam Saul


People also ask

Where can I Find my Search history on Google?

You can find all your Google Search history by accessing the “My Activity” page for your Google account. You’ll find all the Google search items, which you can browse by date or by entering a specific term in the search bar. There will also be a “Delete” button next to the search bar.

How do I Find my Search history in bundle view?

Then scroll down and tap on “Maps history.” You’ll see “Maps Activity” at the top of the screen. Below, you’ll notice the “Search your activity” bar where you can enter the search item from the Maps history. The search history in the Maps app will appear in Bundle View automatically. You’ll also have the option to filter the search history by date.

How do I find a place I’ve searched for before?

If you want to revisit the place you’ve searched for before, simply click anywhere in the search bar, and the list of previous searches will dropdown. Just tap on the location you’re looking for, and it will take you there back again. Make sure to sign in to your Google account first.

How do I find my employment history for free?

Check With Your State Tax Department or Unemployment Office State tax departments and unemployment agencies can often release employment histories for individuals, as long as they worked for in-state employers.


1 Answers

You can use M-p and M-n to navigate up and down in the input history. Also, the current input can be used as a search pattern, i.e. type the start of the command you want to match, then M-p will take you to the next match. This uses the functions nrepl-previous-input and nrepl-next-input. If you don't like those keybindings, you can also rebind to <up> and <down>:

(define-key nrepl-mode-map (kbd "<up>") 'nrepl-previous-input)
(define-key nrepl-mode-map (kbd "<down>") 'nrepl-next-input)

Just add this to your .emacs (and evaluate C-x C-e after each line if you don't want to restart your Emacs). Also, note that M-n and M-p are likely to be bound to similar functionality in other REPL and comint like modes.

like image 185
danlei Avatar answered Sep 22 '22 07:09

danlei