[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with PHP setup
From: |
Rusi |
Subject: |
Re: Help with PHP setup |
Date: |
Fri, 20 Jul 2018 20:38:26 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Saturday, July 21, 2018 at 5:07:36 AM UTC+5:30, Jean-Christophe Helary wrote:
> On a different thread I just asked how to call the file in the front buffer
> without explicitly referring to its name and Eli was nice enough to point at
> the obvious answer: buffer-file-name.
I have this in my emacs setup:
(define-key minibuffer-local-map (kbd "C-f")
(lambda ()
(interactive)
(let ((file-path-maybe (buffer-file-name
(window-buffer (minibuffer-selected-window)))))
(insert (if file-path-maybe
(file-name-nondirectory file-path-maybe)
"%")))))
It emulates vi's replacement of % with filename with a more emacsish replace
C-f with filename
- Re: Help with PHP setup, (continued)
- Re: Help with PHP setup, Bob Proulx, 2018/07/20
- Re: Help with PHP setup, Jean-Christophe Helary, 2018/07/20
- Re: Help with PHP setup, Bob Proulx, 2018/07/20
- Re: Help with PHP setup, Jean-Christophe Helary, 2018/07/21
- Re: Help with PHP setup, Jean-Christophe Helary, 2018/07/22
- Re: Help with PHP setup, Jean-Christophe Helary, 2018/07/22
- Re: Help with PHP setup, Noam Postavsky, 2018/07/22
- Re: Help with PHP setup, Jean-Christophe Helary, 2018/07/22
- Re: Help with PHP setup, Jean-Christophe Helary, 2018/07/22
Message not available
- Re: Help with PHP setup,
Rusi <=